Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 67758 - euse -i give incomplete output
Summary: euse -i give incomplete output
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-16 03:11 UTC by giuseppe
Modified: 2004-12-08 03:43 UTC (History)
1 user (show)

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


Attachments
replacement rewritten in bash (euse.new,11.51 KB, text/plain)
2004-10-16 19:17 UTC, Marius Mauch (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description giuseppe 2004-10-16 03:11:54 UTC
Well if I want know something about a USE flag, I use "euse -i", but its output is
incomplete. For example:

euse -i minimal

minimal [-] [ ] [L] [sys-apps/iproute2] : Builds and installs only the traffic
.
.


but and vim "minimal" USE flag?

In www.gentoo-portage.com read:

minimal -  Build vim with minimal features, resulting in a ~430K binary

This make the use command useless!

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1 David M. Andersen 2004-10-16 13:45:54 UTC
Seems to only get one of them (I guess the last one).

root@laureate:/usr/portage/profiles# grep :minimal use.local.desc
app-editors/vim:minimal - Build vim with minimal features, resulting in a ~430K binary
net-analyzer/net-snmp:minimal - Installs only the libs/daemons needed to be snmp monitored
net-www/drupal:minimal - Disables installing the additional plugins
sys-apps/iproute2:minimal - Builds and installs only the traffic control util.
Comment 2 David M. Andersen 2004-10-16 13:49:47 UTC
The problem is in here.  It parses the local useflag list, overwriting any previous descriptions of the flag as it goes through the file:

sub parse_use_local
{
    my $file_name = shift();
    my $use_flags_ref = shift();
    my @lines = read_file($file_name);
    chomp @lines;
    foreach (@lines) {
        if (m{^\s*([-a-z0-9_/+]*):([-a-z0-9_/+]*)\s*-\s*(.*)$}i)
        {
            my $pkg_name = $1;
            my $use_flag = $2;
            my $use_desc = $3;
            $use_flags_ref->{$use_flag} =
                create_use_flag($use_flag, $use_desc, FLAG_TYPE->[1],
                    FLAG_MASK->[1], $pkg_name);
        }
    }
}

You'd probably need to use list refs as values for that hash to make it work.

Comment 3 Marius Mauch (RETIRED) gentoo-dev 2004-10-16 14:25:18 UTC
bah, I'll just rewrite this in a sane language (probably bash)
Comment 4 Marius Mauch (RETIRED) gentoo-dev 2004-10-16 19:17:31 UTC
Created attachment 41999 [details]
replacement rewritten in bash

Ok, here is a new euse written in bash that fixes this problem (and probably a
few others). Please test and see if I've forgotten something important.
Comment 5 Marius Mauch (RETIRED) gentoo-dev 2004-12-08 03:43:02 UTC
fixed by the new euse in 0.2.0_rc1