Only warn on removal of system virtuals if there is only one satisfying package.
authorJason Stubbs <jstubbs@gentoo.org>
Thu, 8 Sep 2005 13:55:27 +0000 (13:55 -0000)
committerJason Stubbs <jstubbs@gentoo.org>
Thu, 8 Sep 2005 13:55:27 +0000 (13:55 -0000)
svn path=/main/branches/2.0/; revision=1991

ChangeLog
bin/emerge

index bc90eadcd77876be45e83ccf79dcf3a21ad2697a..b6d196dd1298c1b12a30b5a178fa59d298f5af1c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -7,6 +7,9 @@
     2. /var/cache/edb/world is now /var/lib/portage/world.
     3. /etc/portage/profile/virtuals is _USER_ configs only.
 
+  08 Sep 2005; Jason Stubbs <jstubbs@gentoo.org> bin/emerge: Only warn on
+  removal of system virtuals if there is only one satisfying package.
+
   21 Aug 2005; Jason Stubbs <jstubbs@gentoo.org> bin/ebuild.sh: Skip protecting
   ownership of symlinks. Patch by truedfx #94199
 
index e749b53563a63b58b5b2af7d48ab09f9d7fd5078..ce45fe3b429f13e73cbe8daa772b3840cee595ae 100755 (executable)
@@ -2044,8 +2044,14 @@ def unmerge(unmerge_action, unmerge_files):
        for x in realsyslist:
                mycp = portage.dep_getkey(x)
                if mycp in portage.settings.virtuals:
-                       syslist.extend(portage.settings.virtuals[mycp])
-               syslist.append(mycp)
+                       providers = []
+                       for provider in portage.settings.virtuals[mycp]:
+                               if portage.db[portage.root]["vartree"].dbapi.match(provider):
+                                       providers.append(provider)
+                       if len(providers) == 1:
+                               syslist.extend(providers)
+               else:
+                       syslist.append(mycp)
 
        global myopts
        mysettings = portage.config(clone=portage.settings)