stefantalpalaru / gentoo-overlay

Gentoo overlay
GNU General Public License v2.0
46 stars 12 forks source link

dev-lang/python-2.7.16-r100 ebuild fails: #31

Closed ExecutorElassus closed 5 years ago

ExecutorElassus commented 5 years ago

the urllibtests for this version of python fail with "temporary failure in name resolution":

======================================================================
ERROR: test_context_argument (test.test_urllibnet.urlopen_HttpsTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/test/test_urllibnet.py", line 212, in test_context_a
rgument
    response = urllib.urlopen("https://self-signed.pythontest.net", context=context)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/urllib.py", line 87, in urlopen
    return opener.open(url)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/urllib.py", line 213, in open
    return getattr(self, name)(url)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/urllib.py", line 443, in open_https
    h.endheaders(data)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/httplib.py", line 1038, in endheaders
    self._send_output(message_body)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/httplib.py", line 882, in _send_output
    self.send(msg)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/httplib.py", line 844, in send
    self.connect()
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/httplib.py", line 1255, in connect
    HTTPConnection.connect(self)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/httplib.py", line 821, in connect
    self.timeout, self.source_address)
  File "/var/tmp/portage/dev-lang/python-2.7.16-r100/work/Python-2.7.16/Lib/socket.py", line 557, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
IOError: [Errno socket error] [Errno -3] Temporary failure in name resolution.
stefantalpalaru commented 5 years ago

Run emerge --info. Do you have "network-sandbox" in your FEATURES variable? I think it's enabled by the "gentoo-dev" USE flag for "sys-apps/portage".

ExecutorElassus commented 5 years ago

yes, network-sandbox appears in the FEATURES, thus:

# emerge --info | grep network-sandbox
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"

cheers

stefantalpalaru commented 5 years ago

Disable it in "make.conf" and you'll be able to run those tests needing network access.

ExecutorElassus commented 5 years ago

adding a package-specific FEATURES="-network-sandbox" to the appropriate file in /etc/portage/env resolved the issue for me. Thanks, and sorry for the trouble.

stefantalpalaru commented 5 years ago

I found a better way of preventing this in the compilation phase by allowing failures in the profiling task.

Did that in "python-2.7.16-r101.ebuild".