Package: fakechroot
Version: 2.9

This shell script illustrates the issue:

#!/bin/bash

rm -rf new_root
mkdir -p new_root$PWD/foo
touch new_root$PWD/foo/qux

rm -rf foo
mkdir foo
touch foo/bar

export FAKECHROOT_EXCLUDE_PATH="/bin:/lib:/etc:/dev:/proc:/tmp:$PWD/foo"

echo 'fakechroot chroot new_root /bin/sh -c "ls $PWD/foo"'
fakechroot chroot new_root /bin/sh -c "ls $PWD/foo"
echo 'fakechroot chroot new_root /bin/sh -c "cd $PWD/foo && ls"'
fakechroot chroot new_root /bin/sh -c "cd $PWD/foo && ls"
echo 'fakechroot chroot new_root /bin/sh -c "cd $PWD && ls foo"'
fakechroot chroot new_root /bin/sh -c "cd $PWD && ls foo"

Which results in the (buggy) output:

fakechroot chroot new_root /bin/sh -c "ls $PWD/foo"
bar
fakechroot chroot new_root /bin/sh -c "cd $PWD/foo && ls"
bar
fakechroot chroot new_root /bin/sh -c "cd $PWD && ls foo"
qux

The last line should say "bar", not "qux"

I've attached a patch that fixes the issue, but it feels hacky.

Attachment: exclude-handling.diff
Description: Binary data

Reply via email to