Gentoo Archives: gentoo-dev

From: Jason Stubbs <jstubbs@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] Virtuals - required?
Date: Sat, 19 Jun 2004 11:54:16
Message-Id: 200406192051.52265.jstubbs@gentoo.org
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all,

I had another crazy idea that I'd like some feedback on. I'll jump straight 
in. With the current virtuals system, there are two basic deficiencies:

1. Packages that can provide a virtual based on USE flags can't. (#32114)
2. Different versions of a virtual are not supported. (#46968)

The proposal for 1 is to have PROVIDE use a syntax similar to DEPEND for 
specifying any USE flag relationship. There is currently no proposal for 2.

What I'm proposing here is to drop virtuals altogether. Instead, I propose 
using meta-packages similar to kde and gnome. To give a give a cut down 
example:

virtual/x11-1.ebuild:
RDEPEND="x86? ( || ( x11-base/xfree x11-base/xorg-x11 ) )
         sparc? ( || ( x11-base/xorg-x11 x11-base/xfree ) )"

The -1 in x11-1 is an arbitrary version. This example shows the only 
deficiency of doing it this way that I am able to think of. Instead of 
specifying the default virtuals per profile, they would only be able to be 
specified per architecture.

Now to an example that shows a resolution to issue 2 above:

virtual/jdk-1.4.ebuild:
RDEPEND="|| ( >=dev-java/blackdown-jdk-1.4 >=dev-java/kaffe-1.1.4 ... )"

The different versions aspect is represented here by kaffe-1.1.4. Even it is 
installed it is presently not able to satisfy >=virtual/jdk-1.4 as its 
version component does not match.

As for issue number 1, it will require a (already scheduled) portage 
enhancement:

virtual/login-1.ebuild:
RDEPEND="|| sys-apps/shadow[pam] sys-apps/pam-login[-pam]"

Here, shadow with USE="pam" or pam-login with USE="-pam" are supported.

As a side note, a single atom is chosen || () dependencies. If something 
installed satisfied any of the atoms, then the installed package is used. 
Otherwise the first package in the list is used.

Finally, there are two additional benefits. One is a slight speed increase as 
portage would no longer have to concern itself with virtuals. Second, is that 
it would be possible to find all packages that satisify a virtual without 
scanning the entire tree for PROVIDEs.

Do I burn in hell? (Again? ;)

Regards,
Jason Stubbs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iQCVAwUBQNQo2FoikN4/5jfsAQL9sQP/UBzFzWlQJ/VkUx+aWGMX505okHhT3XWf
2AxL1y6uTaFdOD4i5kVtzfB+tQ9IOLsVHygIHZS9rFSTC95bvUAX7/yO91BgzIkL
zdI9gKquLgLRexCpBZ5qMLi5Bfruv3bWuCbnU3gTFIjhUSHT2Xs6oHm7jViwTk1W
X9uje3B4xPQ=
=y7Uj
-----END PGP SIGNATURE-----

--
gentoo-dev@g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Virtuals - required? joe@××××××××××.net
Re: [gentoo-dev] Virtuals - required? Ciaran McCreesh <ciaranm@g.o>
Re: [gentoo-dev] Virtuals - required? Jason Stubbs <jstubbs@g.o>