Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 188678 - app-portage/gentoolkit: equery reports packages keyword masked if KEYWORDS="-*", even if KEYWORDS="${ARCH}" is also present
Summary: app-portage/gentoolkit: equery reports packages keyword masked if KEYWORDS="-...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords: InVCS
: 121220 (view as bug list)
Depends on:
Blocks: 170220
  Show dependency tree
 
Reported: 2007-08-13 03:16 UTC by Carlo Marcelo Arenas Belon
Modified: 2008-02-29 22:02 UTC (History)
1 user (show)

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


Attachments
a patch to HEAD in svn (currently version 431) with a fix (equery-keyworkmask.patch,630 bytes, patch)
2007-08-13 03:22 UTC, Carlo Marcelo Arenas Belon
Details | Diff
a patch to the stable amd64 version (based on 0.2.3-r1) with a slightly refactored logic (gentoolkit-0.2.3-r2-equery-keywordmask.patch,784 bytes, patch)
2007-08-13 04:06 UTC, Carlo Marcelo Arenas Belon
Details | Diff
if package is marked stable, skip looking for masking hints (equery-keywordmask.patch,825 bytes, patch)
2007-09-16 04:40 UTC, Carlo Marcelo Arenas Belon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Carlo Marcelo Arenas Belon 2007-08-13 03:16:08 UTC
several core (and not so core) ebuilds have a KEYWORDS entry like (as copied from sys-libs/glibc-2.5-r4)

KEYWORDS="-* alpha amd64 arm hppa ia64 mips ppc ppc64 ~s390 sh sparc x86"

so that all supported architectures had to be unmasked explicitly, but the logic used in equery's _get_mask_status gets confused by the use of "-*" and indicates the package is otherwise keyword masked


Reproducible: Always

Steps to Reproduce:
1. using "amd64" or "x86" (as an example, but ~amd64 or others could be used as well with different packages)
2. equery -N list | grep glibc
3. look at the MASK status (second field in square brackets)

Actual Results:  
$ equery -N list | grep glibc
[I--] [ -] sys-libs/glibc-2.5-r4 (2.2)

Expected Results:  
$ ./equery -N list | grep glibc
[I--] [  ] sys-libs/glibc-2.5-r4 (2.2)

present in both "amd64" and "~amd64" as well as the HEAD of the svn version
Comment 1 Carlo Marcelo Arenas Belon 2007-08-13 03:22:50 UTC
Created attachment 127920 [details, diff]
a patch to HEAD in svn (currently version 431) with a fix 

tested in "amd64", but most likely working for all other ARCH.

a more complete patch should ideally also invert the order of the "-*" check so that it is clear that it is used as a last resource.

the construction with "pkgmask = pkmask + 0" is not really doing anything but was added as it helped keep the change minimal and was self documenting but could be replaced with some refactored logic and some comments instead for code efficiency
Comment 2 Carlo Marcelo Arenas Belon 2007-08-13 04:06:03 UTC
Created attachment 127921 [details, diff]
a patch to the stable amd64 version (based on 0.2.3-r1) with a slightly refactored logic

tested in "amd64" and with slight modifications (a patch name change since the epatch uses ${PV} to keep consistency with what is used in 0.2.3-r1) also in "~amd64"
Comment 3 Carlo Marcelo Arenas Belon 2007-09-16 03:58:45 UTC
gentoolkit-0.2.4_pre7 still affected by this bug,

these problem was apparently reported in bug 121220 for gentoolkit-0.2.1
Comment 4 Carlo Marcelo Arenas Belon 2007-09-16 04:40:26 UTC
Created attachment 131030 [details, diff]
if package is marked stable, skip looking for masking hints

applies against current HEAD in svn (version 440) and also to current unstable package: gentoolkit-0.2.4_pre7
Comment 5 Paul Varner (RETIRED) gentoo-dev 2007-09-18 21:51:58 UTC
$ svn commit -m "Apply patch from Carlo Marcelo Arenas Belon to fix incorrect display of masking status in equery list command. (Bug #188678)"
Sending        ChangeLog
Sending        src/equery/equery
Transmitting file data ..
Committed revision 443.
Comment 6 Paul Varner (RETIRED) gentoo-dev 2007-09-27 00:19:58 UTC
Fixed in gentoolkit-0.2.4_rc1
Comment 7 michael@smith-li.com 2008-02-29 22:02:40 UTC
*** Bug 121220 has been marked as a duplicate of this bug. ***