On 08/17/2011 12:20 AM, Michał Górny wrote: > On Tue, 16 Aug 2011 03:01:26 -0700 > Zac Medico <zmed...@gentoo.org> wrote: > >> On 08/16/2011 02:32 AM, Ciaran McCreesh wrote: >>> On Tue, 16 Aug 2011 00:19:38 -0700 >>> Zac Medico <zmed...@gentoo.org> wrote: >>>>> Isn't that another, ugly, non-PMS hack which makes people think >>>>> they are creating correct packages? >>>> >>>> Are you saying that you'd prefer to have package managers pull in >>>> redundant packages for not good reason? >>> >>> No, package managers should get things right regardless of whether >>> something is in the 'virtual/' category or not. If they can't get >>> things right, then we need to supply them with more data. >> >> Consider the virtual/jre and virtual/jdk case. Suppose that >> virtual/jdk isn't installed for some reason, but dev-java/sun-jdk >> which satisfies it is already installed. In this case, unless you >> know that virtual/jdk is zero-cost, it's not clear that it costs less >> to install virtual/jdk than to install dev-java/sun-jre-bin. There >> may be lots of cases like this where zero-cost metadata would be >> useful. > > Maybe virtual/jre & virtual/jdk should me merged into a single ebuild > with USE-switchable behavior? Something like: > > RDEPEND="jdk? ( || ( a-jdk b-jdk ) ) > !jdk? ( || ( a-jre b-jre a-jdk b-jdk ) )"
Here it seems like you're introducing a USE flag in order to overcome a shortcoming of the dependency resolver. Note that the jre and jdk relationship isn't necessarily the only relationship with these properties. Wouldn't it be better to make the dependency resolver a bit smarter (as implemented in portage for many years), than to introduce a bunch of workarounds like the jdk USE flag that you suggest? -- Thanks, Zac