On Wed, 15 Apr 2009 08:47:29 +0200
Justin <[email protected]> wrote:
> Thanasis schrieb:
> > on 04/14/2009 11:09 PM Neil Bothwick wrote the following:
> >> On Tue, 14 Apr 2009 16:01:23 +0300, Thanasis wrote:
> >>
> >>
> >>> Suppose I want to set the series of kernel sources:
> >>> gentoo-sources-2.6.28*
> >>> with the ~x86 keyword.
> >>> What should I write in /etc/portage/package.keywords ?
> >>>
> >> ~sys-kernel/gentoo-sources-2.6.28 ~x86
> >>
> >> or, if you are running x86,
> >>
> >> ~sys-kernel/gentoo-sources-2.6.28
> >>
> > What is the meaning of the "~" in front ?
> > Is it documented?
> >
> same as =...2.6.28*
>
> but I disagree with the second suggestion, because no keyword means any
> keyword.
>
You both should read the manual. I have copied some excerpts from relevant
man pages, and even surrounded the most relevant parts with the word
"MYEMPHASIS". Not everyone has this patience.
From man portage:
package.keywords
Per-package KEYWORDS. Useful for mixing unstable pack-
ages in with a normally stable system or vice versa.
This will allow ACCEPT_KEYWORDS to be augmented for a
single package.
Format:
- comment lines begin with # (no inline comments)
- one DEPEND atom per line followed by additional KEYWORDS
<MYEMPHASIS>
- lines without any KEYWORDS imply unstable host arch
</MYEMPHASIS>
Example:
# always use unstable libgd
media-libs/libgd ~x86
# only use stable mplayer
media-video/mplayer -~x86
# always use unstable netcat
net-analyzer/netcat
Note:
In addition to the normal values from ACCEPT_KEYWORDS
package.keywords supports three special tokens:
* package is visible if it is stable on any architecture
~* package is visible if it is in testing on any architecture
** package is always visible (KEYWORDS are ignored completely)
Additional Note: If you encounter the -* KEYWORD, this
indicates that the package is known to be broken on all
systems which are not otherwise listed in KEYWORDS. For
example, a binary only package which is built for x86
will look like:
games-fps/quake3-demo-1.11.ebuild:KEYWORDS="-* x86"
If you wish to accept this package anyways, then use one
of the other keywords in your package.keywords like this:
games-fps/quake3-demo x86
From man 5 ebuild:
DEPEND This should contain a list of all packages that are required for the
program to com-
pile.
DEPEND Atoms
A depend atom is simply a dependency that is used by portage when
calculating
relationships between packages. Please note that if the atom has not
already
been emerged, then the latest version available is matched.
Atom Bases
The base atom is just a full category/packagename. Hence, these
are
base atoms:
sys-apps/sed
sys-libs/zlib
net-misc/dhcp
Atom Versions
It is nice to be more specific and say that only certain versions
of
atoms are acceptable. Note that versions must be combined with a
prefix
(see below). Hence you may add a version number as a postfix to
the
base:
sys-apps/sed-4.0.5
sys-libs/zlib-1.1.4-r1
net-misc/dhcp-3.0_p2
Versions are normally made up of two or three numbers separated by
peri-
ods, such as 1.2 or 4.5.2. This string may be followed by a
character
such as 1.2a or 4.5.2z. Note that this letter is not meant to
indicate
alpha, beta, etc... status. For that, use the optional suffix;
either
_alpha, _beta, _pre (pre-release), _rc (release candidate), or
_p
(patch). This means for the 3rd pre-release of a package, you would
use
something like 1.2_pre3. The suffixes here can be arbitrarily
chained
without limitation.
Atom Prefix Operators [> >= = <= <]
Sometimes you want to be able to depend on general versions rather
than
specifying exact versions all the time. Hence we provide standard
bool-
ean operators:
>media-libs/libgd-1.6
>=media-libs/libgd-1.6
=media-libs/libgd-1.6
<=media-libs/libgd-1.6
<media-libs/libgd-1.6
Extended Atom Prefixes [!~] and Postfixes [*]
Now to get even fancier, we provide the ability to define blocking
pack-
ages and version range matching. Also note that these extended
pre-
fixes/postfixes may be combined in any way with the atom classes
defined
above. Here are some common examples you may find in the portage tree:
!app-text/dos2unix
=dev-libs/glib-2*
!=net-fs/samba-2*
~net-libs/libnet-1.0.2a
!!<sys-apps/portage-2.1.4_rc1
! means block packages from being installed at the same time.
!! means block packages from being installed at the same time
and
explicitly disallow them from being temporarily installed
simultaneously
during a series of upgrades. This syntax is supported beginning
with
EAPI 2.
* means match any version of the package so long as the specified
base
is matched. So with a version of '2*', we can match '2.1',
'2.2',
'2.2.1', etc... and not match version '1.0', '3.0', '4.1', etc...
<MYEMPHASIS>
~ means match any revision of the base version specified. So in
the
above example, we would match versions '1.0.2a',
'1.0.2a-r1',
'1.0.2a-r2', etc...
</MYEMPHASIS>
Atom Slots
Beginning with EAPI 1, any atom can be constrained to match a
specific
SLOT. This is accomplished by appending a colon followed by a SLOT:
x11-libs/qt:3
~x11-libs/qt-3.3.8:3
>=x11-libs/qt-3.3.8:3
=x11-libs/qt-3.3*:3
Atom USE
Beginning with EAPI 2, any atom can be constrained to match specific
USE
flag settings. When used together with SLOT dependencies, USE
dependen-
cies appear on the right hand side of SLOT dependencies.
Unconditional USE Dependencies
Example Meaning
-----------------------------------------------------------
foo[bar] foo must have bar enabled
foo[bar,baz] foo must have both bar and baz enabled
foo[-bar,baz] foo must have bar disabled and baz enabled
Conditional USE Dependencies
Compact Form Equivalent Expanded Form
-----------------------------------------------------
foo[bar?] bar? ( foo[bar] ) !bar? ( foo )
foo[!bar?] bar? ( foo ) !bar? ( foo[-bar] )
foo[bar=] bar? ( foo[bar] ) !bar? ( foo[-bar] )
foo[!bar=] bar? ( foo[-bar] ) !bar? ( foo[bar] )