[Piuparts-devel] Bug#538273: Piuparts fails when PATH environment variable doesn't include /usr/sbin/

Ignace Mouzannar mouzannar at gmail.com
Fri Jul 24 14:33:33 UTC 2009

Package: piuparts
Version: 0.35
Severity: important


Piuparts tries to run debootstrap(8) and chroot(8) which are located
in /usr/sbin/

If /usr/sbin/ is missing from the PATH environment variable, piuparts
returns a Python Traceback.

0m0.0s DEBUG: Created temporary directory /tmp/tmp499Bpg
0m0.0s DEBUG: Setting up minimal chroot for sid at /tmp/tmp499Bpg.
0m0.0s DEBUG: Starting command: ['debootstrap', '--resolve-deps',
'sid', '/tmp/tmp499Bpg', 'http://ftp.fr.debian.org/debian/']
Traceback (most recent call last):
  File "/usr/sbin/piuparts", line 1940, in <module>
  File "/usr/sbin/piuparts", line 1888, in main
  File "/usr/sbin/piuparts", line 547, in create
  File "/usr/sbin/piuparts", line 621, in setup_minimal_chroot
    self.name, settings.debian_mirrors[0][0]])
  File "/usr/sbin/piuparts", line 352, in run
    stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/usr/lib/python2.5/subprocess.py", line 594, in __init__
    errread, errwrite)
  File "/usr/lib/python2.5/subprocess.py", line 1153, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
warsheh:~$ echo $PATH

I took a look at piuparts.py, and it seems, it runs utilities that are
located in /bin, /usr/bin and /usr/sbin [1].

I've attached a small patch that updates the $PATH environment
variable to include the path listed above.

Kind regards,
 Ignace Mouzannar

-- System Information:
Debian Release: squeeze/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (99, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.30-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages piuparts depends on:
ii  apt                        0.7.21        Advanced front-end for dpkg
ii  debootstrap                1.0.15        Bootstrap a basic Debian system
ii  lsb-release                3.2-23        Linux Standard Base version report
ii  lsof                       4.81.dfsg.1-1 List open files
ii  python                     2.5.4-2       An interactive high-level object-o
ii  python-debian              0.1.14        Python modules to work with Debian

piuparts recommends no packages.

piuparts suggests no packages.

-- no debconf information

[1] Here the list of the commands I came across in piuparts.py


-------------- next part --------------
A non-text attachment was scrubbed...
Name: path_env_update.patch
Type: text/x-patch
Size: 344 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/piuparts-devel/attachments/20090724/97edce91/attachment.bin>

More information about the Piuparts-devel mailing list