From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 256EB1389C4 for ; Tue, 12 Feb 2013 09:01:23 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 81CD721C01E; Tue, 12 Feb 2013 09:01:21 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E431121C046 for ; Tue, 12 Feb 2013 09:01:20 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D620533E69B for ; Tue, 12 Feb 2013 09:01:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E3C30E4090 for ; Tue, 12 Feb 2013 09:01:17 +0000 (UTC) From: "Sven Eden" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Eden" Message-ID: <1360567375.84b83ba17b227b6cba56d5c64ecf8252e0050b65.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: Portage.pm ufed.pl.in X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 84b83ba17b227b6cba56d5c64ecf8252e0050b65 X-VCS-Branch: master Date: Tue, 12 Feb 2013 09:01:17 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: d6d13ecb-b097-4aaa-b08f-5791c293d8ae X-Archives-Hash: d5157ea6da80cb0b7b9caa56d160e8f4 commit: 84b83ba17b227b6cba56d5c64ecf8252e0050b65 Author: Sven Eden gmx de> AuthorDate: Mon Feb 11 07:22:55 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Mon Feb 11 07:22:55 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=84b83ba1 Added new pkguse field to global hash and to output string. --- Portage.pm | 5 +++-- ufed.pl.in | 6 ++++-- 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 ? '-' : ' '); } }