Package: fakechroot
Version: 2.17.2-1
Severity: minor
Tags: patch

Dear Maintainer,

Invoking chroot with options fails :
$ fakechroot fakeroot chroot --userspec=root:root my_chroot/
/usr/sbin/chroot: failed to run command 'my_chroot/': No such file or directory

There is no error without options
$ fakechroot fakeroot chroot my_chroot/
# pwd
/

May the line 43 of /usr/sbin/chroot.fakechroot :
fakechroot_chroot_n=$(($fakechroot_chroot_n + 1))
be at an unreachable place (dead code) ?

With the patch below applied :

$ fakechroot fakeroot chroot --userspec=root:root my_chroot/
# pwd
/

(which is the expected behavior)

Thank you for your work to improve fakechroot !

Regards,
JH Chatenet


*** rustine10.patch
diff -Naur a/scripts/chroot.fakechroot.sh b/scripts/chroot.fakechroot.sh
--- a/scripts/chroot.fakechroot.sh      2014-03-12 15:28:05.000000000 +0100
+++ b/scripts/chroot.fakechroot.sh      2014-03-12 15:29:34.000000000 +0100
@@ -39,8 +39,9 @@
 
 fakechroot_chroot_base="$FAKECHROOT_BASE_ORIG"
 
-fakechroot_chroot_n=1
+fakechroot_chroot_n=0
 for fakechroot_chroot_opt in "$@"; do
+    fakechroot_chroot_n=$(($fakechroot_chroot_n + 1))
     case "$fakechroot_chroot_opt" in
         -*)
             continue
@@ -50,7 +51,6 @@
             break
             ;;
     esac
-    fakechroot_chroot_n=$(($fakechroot_chroot_n + 1))
 done
 
 


-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Shell: /bin/sh linked to /bin/dash

Versions of packages fakechroot depends on:
ii  libfakechroot  2.17.2-1

fakechroot recommends no packages.

fakechroot suggests no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to