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 3669C1389C5 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 9E40C21C03F; 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 DC03721C01E 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 E0D6C33E69E 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 81140E407B 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: <1360440518.ea1fee406abce71515ebacfbeac8e16b417d89ce.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: ea1fee406abce71515ebacfbeac8e16b417d89ce 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: daeb017e-2d3c-46b6-8349-7be29f3aa22f X-Archives-Hash: 75590b61e2899d02bfbbe08e8d598550 commit: ea1fee406abce71515ebacfbeac8e16b417d89ce Author: Sven Eden gmx de> AuthorDate: Sat Feb 9 20:08:38 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Sat Feb 9 20:08:38 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=ea1fee40 Save information of /etc/portage/package.use in a new hash area "pkguse". It will later complete the 'C' column instead of 'P', which is reserved for profile settings now. --- Portage.pm | 14 ++++++++------ 1 files changed, 8 insertions(+), 6 deletions(-) diff --git a/Portage.pm b/Portage.pm index 35c3d2d..7ebcbdb 100644 --- a/Portage.pm +++ b/Portage.pm @@ -76,7 +76,8 @@ my $_use_template = { forced => 0, installed => 0, masked => 0, - "package" => 0 + "package" => 0, + pkguse => 0, }; # --- public methods --- @@ -126,8 +127,8 @@ INIT { or die("Sorry, USE_ORDER without make.conf overriding global" . " USE flags are not currently supported by ufed.\n"); - _read_packages; _read_make_defaults; + _read_packages; _read_use_force; ## Must be before _read_use_mask to not _read_use_mask; ## unintentionally unmask explicitly masked flags. _read_archs; @@ -568,6 +569,7 @@ sub _read_make_defaults { # package.use files are parsed next, finished by /etc/portage/package.use for my $dir(@_profiles, "${_EPREFIX}/etc/portage") { + my $tgt = $dir eq "${_EPREFIX}/etc/portage" ? "pkguse" : "package"; for(_noncomments("$dir/package.use") ) { my($pkg, @flags) = split; @@ -586,9 +588,9 @@ sub _read_make_defaults { _add_temp($flag, $pkg); if ($state) { - $_use_temp->{$flag}{"local"}{$pkg}{"package"} = -1; ## explicitly disabled + $_use_temp->{$flag}{"local"}{$pkg}{$tgt} = -1; ## explicitly disabled } else { - $_use_temp->{$flag}{"local"}{$pkg}{"package"} = 1; ## explicitly enabled + $_use_temp->{$flag}{"local"}{$pkg}{$tgt} = 1; ## explicitly enabled } } } @@ -651,8 +653,8 @@ sub _read_packages { _add_temp($flag, "global"); _add_temp($flag, $pkg); - $_use_temp->{$flag}{"local"}{$pkg}{"default"} = $eState ? 1 : $dState ? -1 : 0; - $_use_temp->{$flag}{"local"}{$pkg}{installed} = 1; + $_use_temp->{$flag}{"local"}{$pkg}{"default"} = $eState ? 1 : $dState ? -1 : 0; + $_use_temp->{$flag}{"local"}{$pkg}{installed} = 1; $_use_temp->{$flag}{global}{installed} = 1; } ## End of looping IUSE