Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 540988 - =net-misc/youtube-dl-2015.02.20: IndentationError thrown without USE=offensive
Summary: =net-misc/youtube-dl-2015.02.20: IndentationError thrown without USE=offensive
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Jeroen Roovers (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
: 541154 542060 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-02-22 08:48 UTC by Erik
Modified: 2015-03-04 19:05 UTC (History)
11 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch for the ebuild to fix the -offensive use flag build (fix-youtube-dl_ebuild.patch,1.22 KB, patch)
2015-02-23 22:52 UTC, Richard Ash
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Erik 2015-02-22 08:48:12 UTC
>>> Install youtube-dl-2015.02.20 into /var/tmp/portage/net-misc/youtube-dl-2015.02.20/image/ category net-misc
Compiling /var/tmp/portage/net-misc/youtube-dl-2015.02.20/image///usr/lib64/python2.7/site-packages/youtube_dl/extractor/__init__.py ...
Sorry: IndentationError: unexpected indent (__init__.py, line 339)
Compiling /var/tmp/portage/net-misc/youtube-dl-2015.02.20/image///usr/lib64/python2.7/site-packages/youtube_dl/extractor/__init__.py ...
Sorry: IndentationError: unexpected indent (__init__.py, line 339)
 * Fixing shebang in usr/bin/youtube-dl.
 * Fixing shebang in usr/lib64/python2.7/site-packages/youtube_dl/__main__.py.
 * Fixing shebang in usr/lib64/python2.7/site-packages/youtube_dl/utils.py.
 * Fixing shebang in usr/lib64/python2.7/site-packages/youtube_dl/YoutubeDL.py.
 * Fixing shebang in usr/lib64/python2.7/site-packages/youtube_dl/__init__.py.
>>> Completed installing youtube-dl-2015.02.20 into /var/tmp/portage/net-misc/youtube-dl-2015.02.20/image/

ecompressdir: lzma --best /usr/share/man
ecompressdir: lzma --best /usr/share/doc

>>> Installing (1 of 1) net-misc/youtube-dl-2015.02.20::gentoo
>>> Auto-cleaning packages...

>>> No outdated packages were found on your system.

 * GNU info directory index is up-to-date.

Reproducible: Always
Comment 1 BobbyK 2015-02-22 14:29:20 UTC
Found the same thing, looks like it's the result of the ebuild's:

sed -i -e $( printf '/%s/d;' ${xxx[@]} ) youtube_dl/extractor/__init__.py || die

not being able to handle:

from .pornhub import (
    PornHubIE,
    PornHubPlaylistIE,
)

lines 357 to 360 of the source.  The edit removes only the first line.
Comment 2 Richard Ash 2015-02-23 22:52:12 UTC
Created attachment 397354 [details, diff]
Patch for the ebuild to fix the -offensive use flag build

Confirmed, the sed expression assumes single-line import statements. A multi-line capable version would be possible, but possibly not readable!
The sed expression for removing multi-line imports is reasonable:
'/pornhub/,/)/ d'
but just adding this into to the list of sites doesn't work, because the list is also used as a file name list later on, and that fails. So we have to make it two lists for removal, one for single-line imports and the other for multi-line imports. This is reasonably scalable for the future.

Attached patch to the ebuild (tested against 2015.02.23.1, but needed for .18 and .20 as well).
Comment 3 Patrice Clement gentoo-dev 2015-02-24 10:56:47 UTC
*** Bug 541154 has been marked as a duplicate of this bug. ***
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2015-02-26 07:21:30 UTC
Comment on attachment 397354 [details, diff]
Patch for the ebuild to fix the -offensive use flag build

There ought to be an easier way than to single out the multiline imports like that.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2015-03-04 13:58:35 UTC
Fixed in 2015.03.03.1. Thanks for the report and patch!
Comment 6 Michael Orlitzky gentoo-dev 2015-03-04 19:05:46 UTC
*** Bug 542060 has been marked as a duplicate of this bug. ***