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

Bug 47690

Summary: etcat does not show USE flags
Product: Portage Development Reporter: Alex V. Koval <alex>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED WONTFIX    
Severity: major CC: greg_g
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: patch for etcat

Description Alex V. Koval 2004-04-13 04:28:35 UTC
I have 2 servers, which are emerge synced, and both servers have the same versions of portage and gentoolkit installed. 

At one of servers etcat -u does not show any flags. for same package
equery uses package displays use flags. 

*  sys-apps/portage
      Latest version installed: 2.0.50-r5

*  app-portage/gentoolkit
      Latest version installed: 0.2.0_pre8

Same versions of portage & gentoolkit on another server does not reproduce this problem.

Reproducible: Always
Steps to Reproduce:
1.
mail3 qmail # etcat -u samba
[ Colour Code : set unset ]
[ Legend   : (U) Col 1 - Current USE flags        ]
[          : (I) Col 2 - Installed With USE flags ]

2.

mail3 qmail # equery uses samba
[ Colour Code : set unset ]
[ Legend    : (U) Col 1 - Current USE flags        ]
[           : (I) Col 2 - Installed With USE flags ]

 U I [ Found these USE variables in : net-fs/samba-2.2.8a ]
 + + pam  : Adds support PAM (Pluggable Authentication Modules)
 - - acl  : Adds support for Access Control Lists
 + + cups : Add support for CUPS (Common Unix Printing System)
 - - ldap : Adds LDAP support (Lightweight Directory Access Protocol)
 + + ssl  : Adds support for Secure Socket Layer connections
 + + tcpd : Adds support for TCP wrappers
 - - oav  : Adds support for anti-virus from the openantivirus.org project



Expected Results:  
the same use flags should be printed in both cases of using 'etcat' and 'equery'
Comment 1 Gregorio Guidi (RETIRED) gentoo-dev 2004-04-13 05:28:02 UTC
equery and etcat have some strange behaviour when you have an ~x86 package
installed without ACCEPT_KEYWORDS="~x86".

For instance I have:
# etcat -v net-p2p/mldonkey
*  net-p2p/mldonkey :
        [   ] 2.5.4 (0)
        [M~ ] 2.5.11 (0)
        [M~ ] 2.5.12 (0)
        [M~I] 2.5.16 (0)
        [M~ ] 2.5.16-r1 (0)
        [M~ ] 2.5.16-r2 (0)

# etcat -u net-p2p/mldonkey
[ Colour Code : set unset ]
[ Legend   : (U) Col 1 - Current USE flags        ]
[          : (I) Col 2 - Installed With USE flags ]

# equery uses net-p2p/mldonkey
[ Colour Code : set unset ]
[ Legend    : (U) Col 1 - Current USE flags        ]
[           : (I) Col 2 - Installed With USE flags ]
 
 U I [ Found these USE variables in : net-p2p/mldonkey-2.5.4 ]
 + + gtk : Adds support for x11-libs/gtk+ (The GIMP Toolkit)

(Note that the version reported by equery is not correct)

Maybe you met something similar? What version of samba do you have installed?
Comment 2 Alex V. Koval 2004-04-13 05:36:43 UTC
> Maybe you met something similar? What version of samba do you have installed?

this could be reproduces with any package. there were no "~x86" packages on this system this morning when I reported the problem.  It was fresh system
with no world packages installed, I tried to install Samba and did not found
any flags for it.

More examples:

mail3 root # etcat -u net-p2p/mldonkey
[ Colour Code : set unset ]
[ Legend   : (U) Col 1 - Current USE flags        ]
[          : (I) Col 2 - Installed With USE flags ]
mail3 root # equery uses net-p2p/mldonkey
[ Colour Code : set unset ]
[ Legend    : (U) Col 1 - Current USE flags        ]
[           : (I) Col 2 - Installed With USE flags ]

 U I [ Found these USE variables in : net-p2p/mldonkey-2.5.4 ]
 - - gtk : Adds support for x11-libs/gtk+ (The GIMP Toolkit)


May be I am doing something wrong, then sorry. I am concerned that same portage + same gentoolkit + same package gives different results in different systems. And most important thing that on freshly (yesterday) installed gentoo etcat -u did not shown any USE flags to me with -u option.

Comment 3 Gregorio Guidi (RETIRED) gentoo-dev 2004-04-13 06:04:35 UTC
Ok, so if I get it correctly, the problem is that etcat shows the useflags
of a package only if it is already installed, while equery shows the useflags
of the latest available version of a package, being it installed or not.

I don't know whether it's a bug or a feature, and whether the behaviour of
etcat should be the same of equery, probably yes...
Comment 4 Alex V. Koval 2004-04-13 09:35:25 UTC
Hi

> Ok, so if I get it correctly, the problem is that etcat shows the useflags
> of a package only if it is already installed, while equery shows the useflags
> of the latest available version of a package, being it installed or not.

yes, it seems you right. I have installed samba, and after installed, etcat started to show flags for samba.

from man page of etcat:

       -u <package[-version]>
       uses <package[-version]>

              Outputs the USE flags supported by this package and  also  their
              installed state and description.

so it seems that etacat should show USE flags for package not depending is it installed or not.

Comment 5 Gregorio Guidi (RETIRED) gentoo-dev 2004-04-13 10:40:26 UTC
Created attachment 29218 [details, diff]
patch for etcat

I looked at the code, and it was extremely easy to make a patch,
I just synced a snippet of code with equery.
Applies to gentoolkit-0.2.0_pre8
Comment 6 Alex V. Koval 2004-04-13 23:49:23 UTC
Hi Gregorio,

I tested the patch, works good on my system, thanks.

Alex
Comment 7 Marius Mauch (RETIRED) gentoo-dev 2004-08-21 13:43:41 UTC
this tool is deprecated