diff options
author | Sven Eden <sven.eden@gmx.de> | 2013-02-11 08:22:55 +0100 |
---|---|---|
committer | Sven Eden <sven.eden@gmx.de> | 2013-02-11 08:22:55 +0100 |
commit | 84b83ba17b227b6cba56d5c64ecf8252e0050b65 (patch) | |
tree | 2f1fe43a2d2b0fe6758220d5abf8309e98abba57 | |
parent | Added ~ to package.use filter. (diff) | |
download | ufed-84b83ba17b227b6cba56d5c64ecf8252e0050b65.tar.gz ufed-84b83ba17b227b6cba56d5c64ecf8252e0050b65.tar.bz2 ufed-84b83ba17b227b6cba56d5c64ecf8252e0050b65.zip |
Added new pkguse field to global hash and to output string.
-rw-r--r-- | Portage.pm | 5 | ||||
-rw-r--r-- | ufed.pl.in | 6 |
2 files changed, 7 insertions, 4 deletions
@@ -151,8 +151,8 @@ sub _add_flag { my ($flag, $pkg, $descKey) = @_; - if ($descKey =~ /^\[(.*)\](-?\d+):(-?\d+):(-?\d+):(-?\d+):(-?\d+):(-?\d+)$/ ) { - my ($descr, $conf, $default, $forced, $installed, $masked, $package) + if ($descKey =~ /^\[(.*)\](-?\d+):(-?\d+):(-?\d+):(-?\d+):(-?\d+):(-?\d+):(-?\d+)$/ ) { + my ($descr, $conf, $default, $forced, $installed, $masked, $package, $pkguse) = ($1, $2, $3, $4, $5, $6, $7); my %data = (); @@ -167,6 +167,7 @@ sub _add_flag $data{"default"} = $default; %{$use_flags->{$flag}{global}} = %data; } else { + $data{pkguse} = $pkguse; %{$use_flags->{$flag}{"local"}{$pkg}} = %data; } ++$use_flags->{$flag}{count} if (length($descr)); @@ -100,7 +100,7 @@ sub flags_dialog { # Finally print the local description lines for my $pkg (sort keys %{$conf->{"local"}}) { - $outTxt .= sprintf("\t%s\t (%s) [ %s%s%s%s]\n", + $outTxt .= sprintf("\t%s\t (%s) [ %s%s%s%s%s]\n", $conf->{"local"}{$pkg}{descr}, $pkg, $conf->{"local"}{$pkg}{installed} > 0 ? '+' : @@ -110,7 +110,9 @@ sub flags_dialog { $conf->{"local"}{$pkg}{masked} > 0 ? '+' : $conf->{"local"}{$pkg}{masked} < 0 ? '-' : ' ', $conf->{"local"}{$pkg}{"package"} > 0 ? '+' : - $conf->{"local"}{$pkg}{"package"} < 0 ? '-' : ' '); + $conf->{"local"}{$pkg}{"package"} < 0 ? '-' : ' ', + $conf->{"local"}{$pkg}{pkguse} > 0 ? '+' : + $conf->{"local"}{$pkg}{pkguse} < 0 ? '-' : ' '); } } |