Gentoo Logo
Gentoo Spaceship

Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-portage-dev
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
To: gentoo-dev@g.o, gentoo-portage-dev@g.o
From: Kent Fredric <kentfredric@...>
Subject: Future EAPI feature Request/RFC: ^^( ) for [RP]?DEPEND
Date: Tue, 3 Jul 2012 15:44:04 +1200
Firstly, we already have a ^^(  ) syntax for REQUIRED_USE , "one of,
but not more than one of".

However, to my knowledge, we don't have such for ebuilds.

Sure, there are ways of implementing this in ebuilds without this
notation, but they're a bit messy.

For instance, we seem to find the need for something like this in perl

|| (  =dev-lang/perl-$A  =perl-core/foo-$B )

However, this current form has its limitations:

1. If =perl-core/foo-$B  was previously installed, satisfying the
condition, and =dev-lang/perl-$A becomes installed, perl-core/foo-$B
then gets ignored, but its still left installed, and not cleaned.

2. Due to the nature of how perl works, any version installed from
perl-core/ will "shadow" the version installed by dev-lang/perl , so
that, despite the virtual being satisfied, the version of the code you
get is unsatisfactory from time to time. ie:

  dev-lang/perl-5.10  might provide  'quux-1.2.3'   , as will

If you were previously on perl-5.8 , ( which only shipped quux-1.1 ) ,
and had installed =virtual/perl-quux-1.2.2 ,  you would have to
install =perl-core/quux-1.2.2 to get "quux-1.2.2"

Along comes 5.10, and quux-1.2.3 , so we release   virtual/perl-quux-1.2.3

   || ( =dev-lang/perl-5.10  =perl-core/quux-1.2.3 )

^^ this does what we want most of the time, if you can install
perl-5.10, just do that to get quux 1.2.3, otherwise, install
quux-1.2.3 from perl-core .

However, in the above case, what happens is virtual/perl-quuux-1.2.3
is installed, which is satisfied by '=dev-lang/perl-5.10" , and
portage is happy with that.

And then you do 'perl -e 'use quux 1.2.3' # and it barfs saying 1.2.2
is still installed, which it is, because perl-core/quux-1.2.2 is still
installed, overshadowing the more recent one provided by dev-lang/perl

Ideally, what we want here is ^^(  ), or something like it, so that if
the earlier part is satisfied, latter parts are then removed.

You *can* represent the same logic with other mechanisms, but its much
much more complex to do so.

|| (

And I *think* that will do the right thing, I really have no idea.

The other approach of course is to make the blockers happen in
dev-lang/perl and perl-core/quux , but this has its own problems.

For instance, =dev-lang/perl *cannot* specify which versions of
perl-core/quux can and cannot be installed.  Because its not *perl*
that is trying to define what version is installed, but the virtual.

And perl-core/quux can't really block perl , because the whole point
of perl-core/quux is to be installed on perls other than the ones it
was shipped with.

^^(  ) seems to nicely help solve this problem, and it seems like an
oversight that we have OR , AND , and NOT  dependency rules, but not

P.S. Blame Patrick for this message.


perl -e  "print substr( \"edrgmaM  SPA NOcomil.ic\\@tfrken\", \$_ * 3,
3 ) for ( 9,8,0,7,1,6,5,4,3,2 );"

[PATCH] Allow ROOT in non-/ make.conf
-- Daniel Barkalow
Lists: gentoo-portage-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
[PATCH] Allow ROOT in non-/ make.conf
Next by thread:
[RFC] Mask packages that don't cross-compile
Previous by date:
[PATCH] Allow ROOT in non-/ make.conf
Next by date:
[RFC] Mask packages that don't cross-compile

Updated Jul 03, 2012

Summary: Archive of the gentoo-portage-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.