Fix handling of /etc/portage/package.mask
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 13 Dec 2006 16:12:25 +0000 (16:12 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 13 Dec 2006 16:12:25 +0000 (16:12 -0000)
svn path=/; revision=328

trunk/ChangeLog
trunk/src/revdep-rebuild/revdep-rebuild

index c4cb031ef540ae30bff28fc73d29eebb0a5d65f2..26e1138f2aaad947feb934244f56aa394cff0c9b 100644 (file)
@@ -1,3 +1,7 @@
+2006-12-13 Paul Varner <fuzzyray@gentoo.org>
+       * revdep-rebuild: Fix handling of /etc/portage/package.mask (Bug
+       #158025) Thanks to Wolfram Schlich for the patch.
+
 2006-12-12 Paul Varner <fuzzyray@gentoo.org>
        * equery: Add --tree option to equery files command. (Bug #62898)
        Thanks to scope for the patch.
index d633c3f2e4cac4f0bb9097bf43198211070c786c..54acf98429432b26e2fa560c5aff64f8f9d146ab 100755 (executable)
@@ -557,7 +557,7 @@ if $PACKAGE_NAMES ; then
                                        continue
                                fi
                                # Otherwise mask the other SLOTTED versions and check for latest
-                               if [ -f /etc/portage/package.mask ]
+                               if [ -e /etc/portage/package.mask ]
                                then
                                        mv -f /etc/portage/package.mask /etc/portage/package.mask.revdep-rebuild.backup
                                else
@@ -571,11 +571,10 @@ if $PACKAGE_NAMES ; then
                                done
                                best_visible=$(portageq best_visible $PORTAGE_ROOT $PKG)
                                [ "x" != "x$best_visible" ] && echo $best_visible
-                               if [ -f /etc/portage/package.mask.revdep-rebuild.backup ]
+                               rm -f /etc/portage/package.mask
+                               if [ -e /etc/portage/package.mask.revdep-rebuild.backup ]
                                then
                                        mv -f /etc/portage/package.mask.revdep-rebuild.backup /etc/portage/package.mask
-                               else
-                                       rm -f /etc/portage/package.mask
                                fi
                        done > $LLIST.4_ebuilds
                        echo -e " done.\n  ($LLIST.4_ebuilds)"