Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 63430 - portage inteprets env. variable ACCEPT_KEYWORDS in wrong way
Summary: portage inteprets env. variable ACCEPT_KEYWORDS in wrong way
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-09 08:07 UTC by Marcin Kryczek (RETIRED)
Modified: 2004-09-09 16:30 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcin Kryczek (RETIRED) gentoo-dev 2004-09-09 08:07:45 UTC
I've found that portage inteprets variable ACCEPT_KEYWORDS in wrong way, when it's passed as an enviromnent variable. let me give an example:

first of all, i've change my profile to use gcc-3.4:
<root@CogES>~: ls -l /etc/make.profile
lrwxr-xr-x  1 root root 39 wrz  7 21:40 /etc/make.profile -> /usr/portage/profiles/gcc34-x86-2004.2/

now i want to test new 3.4.2 version of gcc. so i type:
<root@CogES>~: ACCEPT_KEYWORDS="-*" emerge -pv gcc

These are the packages that I would merge, in order:

Calculating dependencies
!!! all ebuilds that could satisfy "gcc" have been masked.
!!! possible candidates are:
- sys-devel/gcc-3.3.2-r3 (masked by: profile, ~keyword)
- sys-devel/gcc-3.2.3-r4 (masked by: profile, missing keyword)
- sys-devel/gcc-3.4.2 (masked by: -* keyword)
- sys-devel/gcc-3.3.3_pre20040408-r1 (masked by: profile, -* keyword)
- sys-devel/gcc-3.3 (masked by: profile, -* keyword)
- sys-devel/gcc-3.1.1-r2 (masked by: profile, missing keyword)
- sys-devel/gcc-3.3.2-r5 (masked by: profile, missing keyword)
- sys-devel/gcc-3.3.4-r1 (masked by: missing keyword)
- sys-devel/gcc-3.3.2-r7 (masked by: profile, ~keyword)
- sys-devel/gcc-3.3.2-r2 (masked by: profile, ~keyword)
- sys-devel/gcc-3.3.3 (masked by: ~keyword)
- sys-devel/gcc-3.3.1-r5 (masked by: profile, ~keyword)
- sys-devel/gcc-3.4.1 (masked by: ~keyword)
- sys-devel/gcc-3.3.3-r6 (masked by: missing keyword)
- sys-devel/gcc-3.3.2-r4 (masked by: profile, ~keyword)
- sys-devel/gcc-2.95.3-r8 (masked by: profile, missing keyword)
- sys-devel/gcc-3.3.3-r3 (masked by: ~keyword)
- sys-devel/gcc-3.3.2-r1 (masked by: profile, ~keyword)
- sys-devel/gcc-3.3.2 (masked by: profile, -* keyword)
- sys-devel/gcc-3.3.3_pre20040426 (masked by: profile, package.mask, -* keyword)
- sys-devel/gcc-3.4.1-r2 (masked by: ~keyword)
- sys-devel/gcc-3.3.3-r5 (masked by: ~keyword)

!!! Error calculating dependencies. Please correct.

hmm - we see here, that portage doesn't add my default ~x86 to -*, but ok - i understand that it could be dangerous in some cases (for example if i had ~x86 as default and i would like to emerge something from x86). so - let's add this:

<root@CogES>~: ACCEPT_KEYWORDS="-* ~x86" emerge -pv gcc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] sys-devel/gcc-3.4.1-r2  -bootstrap -build -debug -f77 -gcj +gtk -hardened -multilib -n32 -n64 +nls -objc -static -(uclibc)  0 kB
[ebuild  N    ] sys-libs/libstdc++-v3-3.3.4  -debug +nls  0 kB

now dependencies are satisfied, but it still wants to install 'only' gcc-3.4.1-r2. let's do one more thing:

<root@CogES>~: echo "sys-devel/gcc -*" >> /etc/portage/package.keywords
<root@CogES>~: emerge -pv gcc

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild  N    ] sys-devel/gcc-3.4.2  -bootstrap -build -debug -f77 -gcj +gtk -hardened -hardened -n32 -n64 +nls +nls -nomultilib -nomultilib -objc -static -(uclibc) -(uclibc)  27,263 kB
[ebuild  N    ] sys-libs/libstdc++-v3-3.3.4  -debug +nls  0 kB

now i've achieved my goal, but as you see - portage doesn't respect ACCEPT_KEYWORDS="-* ~x86" on command line.

and one more question. shouldn't '-*' be treated as a wildcard? i mean - shouldn't `echo "sys-devel/gcc -x86" >> /etc/portage/package.keywords` work as well as `echo "sys-devel/gcc -*" >> /etc/portage/package.keywords`?
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2004-09-09 16:14:08 UTC
/etc/portage/package.keywords treats "-*" incorrectly. ACCEPT_KEYWORDS is an incremental variable, meaning that the definitions from various sources are combined. "-*" signifies to ignore everything found up until that point and only combine from that point onwards. See bug 52206 for what is supported to address your need in 2.0.51.
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2004-09-09 16:15:49 UTC
Forgot to resolve it :/
Comment 3 Marcin Kryczek (RETIRED) gentoo-dev 2004-09-09 16:30:23 UTC
ok, thanks for explonation