Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 348726 - sys-apps/portage hard requires openssl via https in getbinpkg.py even when not used
Summary: sys-apps/portage hard requires openssl via https in getbinpkg.py even when no...
Status: RESOLVED INVALID
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-14 16:41 UTC by SpanKY
Modified: 2010-12-16 10:27 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2010-12-14 16:41:23 UTC
the getbinpkg.py code tries to import both http and https support even if https support isnt necessary.  this causes any system with https support omitted (no openssl) to fail hard.

looking at portage-2.1.8.3 and portage-2.1.9.24

...
 * checking portage-2.1.9.24.tar.bz2 ;-) ...                          [ ok ]
!!! CANNOT IMPORT HTTP.CLIENT: cannot import name HTTPSConnection
Traceback (most recent call last):
...

from the getbinpkg.py code:
try:
    try:
        from http.client import HTTPConnection as http_client_HTTPConnection
        from http.client import HTTPSConnection as http_client_HTTPSConnection
        from http.client import BadStatusLine as http_client_BadStatusLine
        from http.client import ResponseNotReady as http_client_ResponseNotReady
    except ImportError:
        from httplib import HTTPConnection as http_client_HTTPConnection
        from httplib import HTTPSConnection as http_client_HTTPSConnection
        from httplib import BadStatusLine as http_client_BadStatusLine
        from httplib import ResponseNotReady as http_client_ResponseNotReady
except ImportError as e:
    sys.stderr.write(colorize("BAD","!!! CANNOT IMPORT HTTP.CLIENT: ")+str(e)+"\n")
Comment 1 SpanKY gentoo-dev 2010-12-14 17:29:17 UTC
hmm, my pyc/pyo files were screwed up for some reason.  after deleting all portage related ones, it emerged fine.

so if my code-level analysis of getbinpkg is incorrect, feel free to close as INVALID ...
Comment 2 Zac Medico gentoo-dev 2010-12-16 10:27:23 UTC
Yeah, it's invalid.

Anyway, it's fixed so that it won't show the annoying "!! CANNOT IMPORT HTTP.CLIENT" message in this case:

http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=93ffb57b06de7046309174d94e4bb6b6f1467c3c