On Monday 05 September 2005 19:39, Jason Stubbs wrote:
> On Monday 05 September 2005 03:24, Mike Williams wrote:
> > On Sunday 04 September 2005 15:11, Philip Webb wrote:
> > > Having gone over to Udev, I went to unmerge Devfs & got a big red
> > > warning. It appears that the 2005.1 profile gives Devfs as a virtual:
> > > is this an oversight or is there a reason behind it ?
> > > I would have assumed that Udev would now be the required device
> > > manager.
> >
> > You installed using an earlier profile, obviously, when devfs was the
> > default for virtual/dev-manager (otherwise you wouldn't have it
> > installed). Because the profile depends on a virtual any attempt to
> > remove a package providing that virtual will throw up the warning.
> > Exactly the same symptom you're seeing with editors on -user.
>
> Yeah, you're right. virtual/editor is a terrible case. :/
>
> Okay, it's possible that unmerging slotted packages of the one key may
> break your system. How's about not warning if there's more than one
> installed cat/pkg (rather than cat/pkg-ver) satisfying the profile atom
> that is being triggered?

This patch follows that rule. Specifically, only one provider yields a 
warning (even with >1 slotted installation of said package) and multiple 
providers doesn't. Care to give it a go?

-- 
Jason Stubbs
--- emerge.orig	2005-09-05 20:23:26.655817448 +0900
+++ emerge	2005-09-05 20:21:58.586206064 +0900
@@ -2044,8 +2044,14 @@
 	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)

Attachment: pgprKRC3ZhPKT.pgp
Description: PGP signature

Reply via email to