I have my root on flash and have the following symlink. ls -l /var lrwxrwxrwx 1 root root 13 Mar 5 2011 /var -> /mnt/sdb3/var Runing revdep-rebuild gives: * Configuring search environment for revdep-rebuild * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/sdb3/var/cache/revdep-rebuild Can this verification please be done in a way that works with symlinks? Thanks Reproducible: Always Steps to Reproduce: 1. move var to a new location (eg /mnt/sdb3/var ) 2. ln -s <new path> /var 3. run revdep-rebuild Actual Results: revdep-rebuild * Configuring search environment for revdep-rebuild * Working directory expected to be /var/cache/revdep-rebuild, but it is /mnt/sdb3/var/cache/revdep-rebuild Expected Results: command should run and realize that the locations are the same... or the way it tests the location needs to be changed. I use portage 2.2 (and have for years) so repdep-rebuild is not run often. @preserved-rebuild is usually enough.
As a workaround, you could bind mount /mnt/sdb3/var to /var rather than using a symlink.
This is just to confirm that using bind mounts works around the problem.
quick patch @@ -512,7 +512,7 @@ # Dies when it can't change directories cd() { if builtin cd -P "$@"; then - if [[ $1 != $PWD ]]; then + if [[ $(readlink "$1") != $(readlink "$PWD") ]]; then # Some symlink malfeasance is going on die 1 "Working directory expected to be $1, but it is $PWD" fi
Different issue under same description, may appear with crossdev-produced packages, i.e. in regular setups: ls -l /usr/lib lrwxrwxrwx 1 root root 5 Oct 6 2016 /usr/lib -> lib64 Result of a revdep-rebuild run: !!! Broken orphaned files: No installed package was found for the following: * /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.4/libstdc++.so.6.0.20 * /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.4/libitm.so.1.0.0 * /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.4/libgomp.so.1.0.0 * /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.4/libubsan.so.0.0.0 * /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.4/libasan.so.1.0.0 * /usr/lib64/gcc/armv7a-hardfloat-linux-gnueabi/4.9.4/libatomic.so.1.1.0 Package database refers to /usr/lib, while revdep-rebuild refers only to fully resolved path.