summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Eden <sven.eden@gmx.de>2013-02-11 08:22:55 +0100
committerSven Eden <sven.eden@gmx.de>2013-02-11 08:22:55 +0100
commit84b83ba17b227b6cba56d5c64ecf8252e0050b65 (patch)
tree2f1fe43a2d2b0fe6758220d5abf8309e98abba57
parentAdded ~ to package.use filter. (diff)
downloadufed-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.pm5
-rw-r--r--ufed.pl.in6
2 files changed, 7 insertions, 4 deletions
diff --git a/Portage.pm b/Portage.pm
index fed45d9..a1e0f78 100644
--- a/Portage.pm
+++ b/Portage.pm
@@ -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));
diff --git a/ufed.pl.in b/ufed.pl.in
index 76483e9..2c5b380 100644
--- a/ufed.pl.in
+++ b/ufed.pl.in
@@ -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 ? '-' : ' ');
}
}