Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 22348

Summary: explaination of useflag dep usage
Product: [OLD] Docs-developer Reporter: Alastair Tse (RETIRED) <liquidx>
Component: Developers HOWTOAssignee: Sven Vermeulen (RETIRED) <swift>
Status: RESOLVED FIXED    
Severity: normal CC: docs-team
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Proposed patch

Description Alastair Tse (RETIRED) gentoo-dev 2003-06-06 10:07:05 UTC
three improvements i would like with the useflag dep usage documentation at : 

http://www.gentoo.org/doc/en/gentoo-howto.xml

1. explain ternary operator x? (a) : (b) , an example would be:

It is possible also specify what dependencies should be used if x useflag is not
enabled. You can do this with the ternary operator in the following fashion:

gtk2? ( >=x11-libs/gtk+-2 ) : ( =x11-libs/gtk+-1.2* )

The above example shows if "gtk2" useflag is enabled, add >=x11-libs/gtk+-2 to
the dependencies, otherwise, if "gtk2" useflag is not enabled, add
=x11-libs/gtk+-1.2*. 

2. explain the ! operator before the use flags

Alternatively, to signify dependencies in the absense of a useflag, you can  use
the ! symbol before the useflag. An example would be :

gtk? ( >=x11-libs/gtk+-2 )
!gtk? ( >=x11-libs/qt-3 )

This would imply if the "gtk" useflag was enabled, add >=x11-libs/gtk+-2 to the
dependencies, and if the "gtk" useflag was not enabled, add >=x11-libs/qt-3 to
the dependencies. 

3. can we change the example in the docs to not depend on >=gnome-base/gnome-1.4
?  Because we shouldn't set a bad example to people depending on this meta
package. If people want to depend on gnome, they should use
>=gnome-base/gnome-libs-1.4 (for gtk1) or >=gnome-base/libgnome-2 (for gtk2). we
don't want to encourage people to start using the gnome meta packages as a
dependency.

it would be great if you could replace it with another example, like --with-x or
something :)
Comment 1 Jorge Paulo (RETIRED) gentoo-dev 2003-06-16 19:02:52 UTC
I'll edit the document and make the requested changes.
Comment 2 Sven Vermeulen (RETIRED) gentoo-dev 2003-07-05 12:20:03 UTC
peesh is gone, assigning back to docs-team
Comment 3 Sven Vermeulen (RETIRED) gentoo-dev 2003-08-18 04:54:44 UTC
Created attachment 16261 [details, diff]
Proposed patch

This patch also fixes the non-working ?style=printable.

Fixed document is also available on
http://dev.gentoo.org/~swift/gentoo-howto.html
Comment 4 Sven Vermeulen (RETIRED) gentoo-dev 2003-08-20 02:28:48 UTC
Antifa reviewed this one.

http://article.gmane.org/gmane.linux.gentoo.documentation/227

Committed.