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 5C4241389C0 for ; Tue, 12 Feb 2013 09:01:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5821221C077; Tue, 12 Feb 2013 09:01:29 +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 A787621C074 for ; Tue, 12 Feb 2013 09:01:23 +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 B563533E69F for ; Tue, 12 Feb 2013 09:01:21 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E0E97E409B for ; Tue, 12 Feb 2013 09:01:18 +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: <1360604442.9f5ebb316d6b464cdc71060adc1ab53e678cfe46.yamakuzure@gentoo> Subject: [gentoo-commits] proj/ufed:master commit in: / X-VCS-Repository: proj/ufed X-VCS-Files: Portage.pm X-VCS-Directories: / X-VCS-Committer: yamakuzure X-VCS-Committer-Name: Sven Eden X-VCS-Revision: 9f5ebb316d6b464cdc71060adc1ab53e678cfe46 X-VCS-Branch: master Date: Tue, 12 Feb 2013 09:01:18 +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: 1bf676ae-e70a-4a66-a3f6-5971355cd650 X-Archives-Hash: cdbe75c3c8fb4d8a54e5bfc7866f75a8 commit: 9f5ebb316d6b464cdc71060adc1ab53e678cfe46 Author: Sven Eden gmx de> AuthorDate: Mon Feb 11 17:40:42 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Mon Feb 11 17:40:42 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=9f5ebb31 Added local flags "default" setting from IUSE to . Changed the detection of "affected" packages to be more specific. --- Portage.pm | 19 ++++++++++++------- 1 files changed, 12 insertions(+), 7 deletions(-) diff --git a/Portage.pm b/Portage.pm index 5416beb..1f3bb55 100644 --- a/Portage.pm +++ b/Portage.pm @@ -160,9 +160,9 @@ sub _add_flag $data{installed} = $installed; $data{masked} = $masked; $data{"package"} = $package; + $data{"default"} = $default; if ("global" eq "$pkg") { $data{conf} = $conf; - $data{"default"} = $default; %{$use_flags->{$flag}{global}} = %data; } else { $data{pkguse} = $pkguse; @@ -308,6 +308,7 @@ sub _gen_use_flags my $pDesc = ""; my $pKey = ""; my $pRef = undef; + my $pdLen = 0; # Build the description consolidation hash if ($lCount) { @@ -318,18 +319,22 @@ sub _gen_use_flags } for my $pkg (sort keys %{$flagRef->{"local"}}) { $pRef = $flagRef->{"local"}{$pkg}; - $pDesc = "$pRef->{descr}"; + $pdLen = length($pRef->{descr}); + $pDesc = $pdLen ? "$pRef->{descr}" : $gDesc; - # If the flag has no local description, it is "affected" - length($pDesc) or $pDesc = $gDesc; - # Now the Key can be assembled... $pKey = sprintf("[%s]%d:%d:%d:%d:%d:%d:%d", $pDesc, $pRef->{conf}, $pRef->{"default"}, $pRef->{forced}, $pRef->{installed}, $pRef->{masked}, $pRef->{"package"}, $pRef->{pkguse}); - # ...and safed, unless it equals the global key - if ($pKey ne $gKey) { + # ...and safed, if it has an own description or differs in its settings from global + if ($pdLen || (0 == $lCount) ## has own description or no global description available + || $pRef->{"default"} ## explicitly set default from IUSE + || $pRef->{forced} ## explicitly (un)forced from package.use.force + || $pRef->{masked} ## explicitly (un)masked from package.use.mask + || $pRef->{pkguse} ## explicitly (un)set from users package.use + ) { +printf STDERR "Added $flag / $pkg local \"%s\" (lCount %d, pdLen %d)\n", $pKey, $lCount, $pdLen; $descCons{$pKey}{$pkg} = 1; ++$lCount; }