<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>188678</bug_id>
          
          <creation_ts>2007-08-13 03:16 0000</creation_ts>
          <short_desc>app-portage/gentoolkit: equery reports packages keyword masked if KEYWORDS=&quot;-*&quot;, even if KEYWORDS=&quot;${ARCH}&quot; is also present</short_desc>
          <delta_ts>2008-02-29 22:02:40 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Portage Development</product>
          <component>Tools</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <keywords>InSVN</keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>170220</blocked>
          
          <everconfirmed>1</everconfirmed>
          <reporter>carenas@sajinet.com.pe</reporter>
          <assigned_to>tools-portage@gentoo.org</assigned_to>
          <cc>rossi.f@inwind.it</cc>

      

      
          <long_desc isprivate="0">
            <who>carenas@sajinet.com.pe</who>
            <bug_when>2007-08-13 03:16:08 0000</bug_when>
            <thetext>several core (and not so core) ebuilds have a KEYWORDS entry like (as copied from sys-libs/glibc-2.5-r4)

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

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


Reproducible: Always

Steps to Reproduce:
1. using &quot;amd64&quot; or &quot;x86&quot; (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 &quot;amd64&quot; and &quot;~amd64&quot; as well as the HEAD of the svn version</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carenas@sajinet.com.pe</who>
            <bug_when>2007-08-13 03:22:50 0000</bug_when>
            <thetext>Created an attachment (id=127920)
a patch to HEAD in svn (currently version 431) with a fix 

tested in &quot;amd64&quot;, but most likely working for all other ARCH.

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

the construction with &quot;pkgmask = pkmask + 0&quot; 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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carenas@sajinet.com.pe</who>
            <bug_when>2007-08-13 04:06:03 0000</bug_when>
            <thetext>Created an attachment (id=127921)
a patch to the stable amd64 version (based on 0.2.3-r1) with a slightly refactored logic

tested in &quot;amd64&quot; 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 &quot;~amd64&quot;</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carenas@sajinet.com.pe</who>
            <bug_when>2007-09-16 03:58:45 0000</bug_when>
            <thetext>gentoolkit-0.2.4_pre7 still affected by this bug,

these problem was apparently reported in bug 121220 for gentoolkit-0.2.1</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>carenas@sajinet.com.pe</who>
            <bug_when>2007-09-16 04:40:26 0000</bug_when>
            <thetext>Created an attachment (id=131030)
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</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2007-09-18 21:51:58 0000</bug_when>
            <thetext>$ svn commit -m &quot;Apply patch from Carlo Marcelo Arenas Belon to fix incorrect display of masking status in equery list command. (Bug #188678)&quot;
Sending        ChangeLog
Sending        src/equery/equery
Transmitting file data ..
Committed revision 443.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>fuzzyray@gentoo.org</who>
            <bug_when>2007-09-27 00:19:58 0000</bug_when>
            <thetext>Fixed in gentoolkit-0.2.4_rc1</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>michael@smith-li.com</who>
            <bug_when>2008-02-29 22:02:40 0000</bug_when>
            <thetext>*** Bug 121220 has been marked as a duplicate of this bug. ***</thetext>
          </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>127920</attachid>
            <date>2007-08-13 03:22 0000</date>
            <desc>a patch to HEAD in svn (currently version 431) with a fix </desc>
            <filename>equery-keyworkmask.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHRydW5rL3NyYy9lcXVlcnkvZXF1ZXJ5Cj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHRydW5rL3NyYy9l
cXVlcnkvZXF1ZXJ5CShyZXZpc2lvbiA0MzEpCisrKyB0cnVuay9zcmMvZXF1ZXJ5L2VxdWVyeQko
d29ya2luZyBjb3B5KQpAQCAtMTQxNyw3ICsxNDE3LDkgQEAKIAkJIyBpZiAicGFja2FnZS5tYXNr
IiBpbiBtYXNrcmVhc29uczoKIAkJCXBrZ21hc2sgPSBwa2dtYXNrICsgMwogCQlrZXl3b3JkcyA9
IHBrZy5nZXRfZW52X3ZhcigiS0VZV09SRFMiKS5zcGxpdCgpCi0JCWlmICJ+IiArIGdlbnRvb2xr
aXQuc2V0dGluZ3NbIkFSQ0giXSBpbiBrZXl3b3JkczoKKwkJaWYgZ2VudG9vbGtpdC5zZXR0aW5n
c1siQVJDSCJdIGluIGtleXdvcmRzOgorCQkJcGtnbWFzayA9IHBrZ21hc2sgKyAwCisJCWVsaWYg
In4iICsgZ2VudG9vbGtpdC5zZXR0aW5nc1siQVJDSCJdIGluIGtleXdvcmRzOgogCQkJcGtnbWFz
ayA9IHBrZ21hc2sgKyAxCiAJCWVsaWYgIi0qIiBpbiBrZXl3b3JkcyBvciAiLSIgKyBnZW50b29s
a2l0LnNldHRpbmdzWyJBUkNIIl0gaW4ga2V5d29yZHM6CiAJCQlwa2dtYXNrID0gcGtnbWFzayAr
IDIK
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>127921</attachid>
            <date>2007-08-13 04:06 0000</date>
            <desc>a patch to the stable amd64 version (based on 0.2.3-r1) with a slightly refactored logic</desc>
            <filename>gentoolkit-0.2.3-r2-equery-keywordmask.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIHNyYy9lcXVlcnkvZXF1ZXJ5Lmtld29ya2RtYXNrCTIwMDctMDgtMTIgMjA6NDc6NTUuMDAw
MDAwMDAwIC0wNzAwCisrKyBzcmMvZXF1ZXJ5L2VxdWVyeQkyMDA3LTA4LTEyIDIwOjQ2OjUyLjAw
MDAwMDAwMCAtMDcwMApAQCAtMTM3MCwxMCArMTM3MCwxMSBAQCBjbGFzcyBDbWRMaXN0UGFja2Fn
ZXMoQ29tbWFuZCk6CiAJCWlmIHBrZy5pc19tYXNrZWQoKToKIAkJCXBrZ21hc2sgPSBwa2dtYXNr
ICsgMwogCQlrZXl3b3JkcyA9IHBrZy5nZXRfZW52X3ZhcigiS0VZV09SRFMiKS5zcGxpdCgpCi0J
CWlmICJ+IiArIGdlbnRvb2xraXQuc2V0dGluZ3NbIkFSQ0giXSBpbiBrZXl3b3JkczoKLQkJCXBr
Z21hc2sgPSBwa2dtYXNrICsgMQotCQllbGlmICItKiIgaW4ga2V5d29yZHMgb3IgIi0iICsgZ2Vu
dG9vbGtpdC5zZXR0aW5nc1siQVJDSCJdIGluIGtleXdvcmRzOgotCQkJcGtnbWFzayA9IHBrZ21h
c2sgKyAyCisJCWlmIGdlbnRvb2xraXQuc2V0dGluZ3NbIkFSQ0giXSBub3QgaW4ga2V5d29yZHM6
CisJCQlpZiAifiIgKyBnZW50b29sa2l0LnNldHRpbmdzWyJBUkNIIl0gaW4ga2V5d29yZHM6CisJ
CQkJcGtnbWFzayA9IHBrZ21hc2sgKyAxCisJCQllbGlmICItIiArIGdlbnRvb2xraXQuc2V0dGlu
Z3NbIkFSQ0giXSBpbiBrZXl3b3JkcyBvciAiLSoiIGluIGtleXdvcmRzOgorCQkJCXBrZ21hc2sg
PSBwa2dtYXNrICsgMgogCQlyZXR1cm4gcGtnbWFzawogCiAJZGVmIF9nZW5lcmljX3ByaW50KHNl
bGYsIGhlYWRlciwgZXhjbHVkZSwgbWF0Y2hlcywgcngsIHN0YXR1cyk6Cg==
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>131030</attachid>
            <date>2007-09-16 04:40 0000</date>
            <desc>if package is marked stable, skip looking for masking hints</desc>
            <filename>equery-keywordmask.patch</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IHRydW5rL3NyYy9lcXVlcnkvZXF1ZXJ5Cj09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KLS0tIHRydW5rL3NyYy9l
cXVlcnkvZXF1ZXJ5CShyZXZpc2lvbiA0NDApCisrKyB0cnVuay9zcmMvZXF1ZXJ5L2VxdWVyeQko
d29ya2luZyBjb3B5KQpAQCAtMTQxNywxMCArMTQxNywxMSBAQAogCQkjIGlmICJwYWNrYWdlLm1h
c2siIGluIG1hc2tyZWFzb25zOgogCQkJcGtnbWFzayA9IHBrZ21hc2sgKyAzCiAJCWtleXdvcmRz
ID0gcGtnLmdldF9lbnZfdmFyKCJLRVlXT1JEUyIpLnNwbGl0KCkKLQkJaWYgIn4iICsgZ2VudG9v
bGtpdC5zZXR0aW5nc1siQVJDSCJdIGluIGtleXdvcmRzOgotCQkJcGtnbWFzayA9IHBrZ21hc2sg
KyAxCi0JCWVsaWYgIi0qIiBpbiBrZXl3b3JkcyBvciAiLSIgKyBnZW50b29sa2l0LnNldHRpbmdz
WyJBUkNIIl0gaW4ga2V5d29yZHM6Ci0JCQlwa2dtYXNrID0gcGtnbWFzayArIDIKKwkJaWYgZ2Vu
dG9vbGtpdC5zZXR0aW5nc1siQVJDSCJdIG5vdCBpbiBrZXl3b3JkczoKKwkJCWlmICJ+IiArIGdl
bnRvb2xraXQuc2V0dGluZ3NbIkFSQ0giXSBpbiBrZXl3b3JkczoKKwkJCQlwa2dtYXNrID0gcGtn
bWFzayArIDEKKwkJCWVsaWYgIi0iICsgZ2VudG9vbGtpdC5zZXR0aW5nc1siQVJDSCJdIGluIGtl
eXdvcmRzIG9yICItKiIgaW4ga2V5d29yZHM6CisJCQkJcGtnbWFzayA9IHBrZ21hc2sgKyAyCiAJ
CXJldHVybiBwa2dtYXNrCiAKIAlkZWYgX2dlbmVyaWNfcHJpbnQoc2VsZiwgaGVhZGVyLCBleGNs
dWRlLCBtYXRjaGVzLCByeCwgc3RhdHVzKToK
</data>        

          </attachment>
    </bug>

</bugzilla>