Duncan posted on Sat, 26 Jul 2014 08:05:32 +0000 as excerpted: > Ian Stakenvicius posted on Fri, 25 Jul 2014 14:49:44 -0400 as excerpted: > >> Hey all.. So, putting aside for now how much of a mess this would be >> to implement in the virtuals' ebuilds themselves, what do people think >> of changing the virtuals so that they contain an entry in IUSE for each >> provider that can satisfy it? >> >> The idea here is that the package satisfying a virtual could be >> optionally explicitly-chosen through package.use (or USE= in make.conf, >> perhaps) instead of having an entry in @world, that way if nothing >> depends on the virtual then it and the provider can be - --depclean'ed >> from the system. The idea is specifically NOT to have rdeps depend on >> these flags, that would undermine the whole purpose of the virtual; it >> would just be for end-users to set if they so chose. > > What about handling each such virtual_USE as a USE_EXPAND?
> [Example] VIRTUAL_KRB5 Hmm, thinking toward implementation, what about a virtual.eclass, inherited by virtuals? It could even have a declarative interface, such that from virtual/krb5-0.ebuild (I've left out the minversion and multilib-usedep stuff here as the example above did as well, but it could be passed too)... inherit virtual VIRTUAL_EXCLUSIVE="app-crypt/mit-krb5 app-crypt/heimdal" ... would setup most of the basics for an exclusive virtual, including the VIRTUAL_KRB5 USE_EXPAND name (based on $PN), the two providers and rdepends, the fact that they're exclusive and thus a default pkg_pretend or required_use, etc. In for instance virtual/editors, this could be used in place of its current RDEPEND: VIRTUAL_MULTI=" app-editors/nano app-editors/dav app-editors/e3 ... mail-client/alpine[-onlyalpine] sys-apps/ed " With an eclass, the default pkg_pretend for exclusive-virtuals would be standardized, standardizing the error message and explanation for it as well, giving it a chance to be a bit more informative than unstandardized one-offs might tend to be. Of course the same eclass idea could be used with simple USE flags as well, but I prefer the USE_EXPANDs. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman