guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] gnu: python-2: update to 2.7.10.


From: Eric Bavier
Subject: Re: [PATCH] gnu: python-2: update to 2.7.10.
Date: Tue, 18 Aug 2015 12:48:15 -0500
User-agent: Roundcube Webmail/1.0.6

On 2015-08-18 11:23, Eric Dvorsak wrote:
Ludovic Courtès writes:

address@hidden skribis:

Altough the tests are still failing, I ran them after the build failed
with :

guix build -K
cd tmp/nix-build-*
env -i $(which bash)
source environment-variables

And they all passed except for some skips and a module that failed
trying to write to a dir without permissions.

Maybe there is a fix to do to enable the tests, the problem might be
coming from the OS module. They fail because of an OSError exception,
so I wonder if it could be because the module doesn't work withing the
chroot.

Wild guess: Could it be because Python’s bindings for ‘popen’ or
something like that refer to /bin/sh, which is unavailable in the
chroot, leading to ENOENT?  Could you ‘grep -r /bin/sh’ in the source?

Thanks,
Ludo’.

Ag Results for `/bin/sh':

plat-freebsd4/regen:1:#! /bin/sh
plat-aix3/regen:1:#! /bin/sh
plat-beos5/regen:1:#! /bin/sh
plat-os2emx/regen:1:#! /bin/sh
distutils/tests/test_install_scripts.py:57:
write_script("shell.sh", ("#!/bin/sh\n"
distutils/tests/test_build_scripts.py:68:
("#!/bin/sh\n"
distutils/tests/test_spawn.py:35:            self.write_file(exe,
'#!/bin/sh\nexit 1')
distutils/tests/test_spawn.py:47:            self.write_file(exe,
'#!/bin/sh\nexit 0')
test/test__osx_support.py:47: f.write("#!/bin/sh\n/bin/echo OK\n")
test/test__osx_support.py:59:            f.write("#!/bin/sh\n/bin/echo
ExpectedOutput\n")
test/test__osx_support.py:150:
f.write("#!/bin/sh\n/bin/echo " + c_output)
test/test__osx_support.py:206: f.write("#!/bin/sh\nexit 255")
test/test_os.py:365:        if os.path.exists("/bin/sh"):
test/test_os.py:367:            with os.popen("/bin/sh -c 'echo
$HELLO'") as popen:
test/test_subprocess.py:862:        os.write(f, "#!/bin/sh\n")
test/test_subprocess.py:906:        os.write(f, "#!/bin/sh\n")
test/test_subprocess.py:925:        sh = '/bin/sh'
test/test_subprocess.py:927:            # Test will fail if /bin/sh is
a symlink to csh.
plat-irix5/regen:1:#! /bin/sh
plat-generic/regen:1:#! /bin/sh
plat-linux2/regen:1:#! /bin/sh
plat-netbsd1/regen:1:#! /bin/sh
ctypes/macholib/fetch_macholib:1:#!/bin/sh
plat-atheos/regen:1:#! /bin/sh
plat-aix4/regen:1:#! /bin/sh
plat-irix6/regen:1:#! /bin/sh
plat-freebsd6/regen:1:#! /bin/sh
plat-next3/regen:1:#! /bin/sh
plat-freebsd5/regen:1:#! /bin/sh
This one ?
popen2.py:84:            cmd = ['/bin/sh', '-c', cmd]
plat-freebsd7/regen:1:#! /bin/sh
plat-darwin/regen:1:#! /bin/sh
subprocess.py:161:/bin/sh implicitly.  This means that all characters,
including shell
subprocess.py:226:Replacing /bin/sh shell backquote
subprocess.py:559:    >>> check_output(["/bin/sh", "-c",
subprocess.py:1209:                args = ["/bin/sh", "-c"] + args
pipes.py:36:second likewise for the output. The command must be valid /bin/sh
pipes.py:262:# Reliably quote a string as a single argument for /bin/sh
plat-freebsd8/regen:1:#! /bin/sh
plat-sunos5/regen:1:#! /bin/sh
plat-unixware7/regen:1:#! /bin/sh


Here is the def :

    def _run_child(self, cmd):
        if isinstance(cmd, basestring):
            cmd = ['/bin/sh', '-c', cmd]
        os.closerange(3, MAXFD)
        try:
            os.execvp(cmd[0], cmd)
        finally:
            os._exit(1)


What should be done to fix this ?

The python recipe already substitutes references to "/bin/sh" in Lib/subprocess.py and Lib/popen2.py in the 'patch-lib-shells' phase. It looks like some of the test files themselves need to be patched, however.

--
`~Eric



reply via email to

[Prev in Thread] Current Thread [Next in Thread]