fix build-compare support in chroot mode
authorAdrian Schröter <adrian@suse.de>
Wed, 21 Apr 2010 17:22:44 +0000 (19:22 +0200)
committerAdrian Schröter <adrian@suse.de>
Wed, 21 Apr 2010 17:22:44 +0000 (19:22 +0200)
build

diff --git a/build b/build
index c4d7c6d..b2a0499 100755 (executable)
--- a/build
+++ b/build
@@ -1236,7 +1236,7 @@ for SPECFILE in "${SPECFILES[@]}" ; do
                # remove setuid bit if files belong to user to make e.g. mount work
                find $BUILD_ROOT/{bin,sbin,usr/bin,usr/sbin} -type f -uid $UID -perm +4000 -print0 | xargs -0 --no-run-if-empty chmod -s
            fi
-           if [ -d "$OLD_PACKAGES" ]; then
+           if [ -d "$OLD_PACKAGES" -a "$OLD_PACKAGES" != "$BUILD_ROOT/.build.oldpackages" ] ; then
               rm -rf $BUILD_ROOT/.build.oldpackages
               cp -a $OLD_PACKAGES $BUILD_ROOT/.build.oldpackages
            fi