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 DAA271389C0 for ; Tue, 12 Feb 2013 09:01:22 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 7DC2421C004; 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 DEFF321C03F 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 BAAAB33E697 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 548F1E4073 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: <1360439622.42d1d806290ca8e0adc6fd9f3111c0dd11c24b1c.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: 42d1d806290ca8e0adc6fd9f3111c0dd11c24b1c 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: 3620c5cd-b80c-4b60-a75c-7e12e31c5bde X-Archives-Hash: 6f9feeb2023e51934eed790fd2695104 commit: 42d1d806290ca8e0adc6fd9f3111c0dd11c24b1c Author: Sven Eden gmx de> AuthorDate: Sat Feb 9 19:53:42 2013 +0000 Commit: Sven Eden gmx de> CommitDate: Sat Feb 9 19:53:42 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=42d1d806 Updated some information and changed IUSE usage to manipulate "default" values for packages instead of "package". --- Portage.pm | 35 ++++++++++------------------------- 1 files changed, 10 insertions(+), 25 deletions(-) diff --git a/Portage.pm b/Portage.pm index b647e7a..35c3d2d 100644 --- a/Portage.pm +++ b/Portage.pm @@ -37,8 +37,9 @@ BEGIN { # Note: Packages without description are only listed here if their settings differ from the global # ->{forced} = The flag is explicitly unforced (-1), default (0) or explicitly force enabled (1) for this package # ->{installed} = This package is installed -# ->{masked} = The flag is explicitly unmasked (-1), default (0) or explicitly masked (1) for this package -# ->{package} = The flag is explicitly disabled (-1), default (0) or explicitly enabled (1) for this package. +# ->{masked} = The flag is explicitly unmasked (-1), default (0) or masked (1) for this package +# ->{package} = The flag is explicitly disabled (-1), default (0) or enabled (1) for this package by (profiles)/package.use +# ->{pkguse} = The flag is explicitly disabled (-1), default (0) or enabled(1) for this package by /etc/portage/package.use # Note: This is a combination of the ebuilds IUSE and the installation PKGUSE and only set for installed packages. our $use_flags; @@ -57,14 +58,15 @@ my @_profiles = (); # {"local"}-> {package} = conf hash for per package settings # global and per package settings: # ->{conf} Is either disabled, left alone or enabled by make.conf (-1, 0, 1) -# ->{default} Is either disabled, left alone or enabled by make.defaults (-1, 0, 1) +# ->{default} Is either disabled, left alone or enabled by make.defaults (-1, 0, 1) (global) or installed packages IUSE (local) # ->{descr} Description from use.desc ({global}) or use.local.desc {cat/pkg} (string) # ->{forced} Is force enabled (implies {masked}=1) in any *use.force # For packages this is only set to -1 (explicitly unforced) or +1 (explicitly forced). 0 means "left alone". # ->{installed} Has one installed package ({global}) or is installed {cat/pkg} (0,1) # ->{masked} Is masked by any *use.mask (0,1) # For packages this is only set to -1 (explicitly unmasked) or +1 (explicitly masked). 0 means "left alone". -# ->{package} Is either disabled, left alone or enabled by its ebuild (IUSE) or by user package.use (PKGUSE) (-1, 0, 1) +# ->{package} Is either disabled, left alone or enabled by the profiles package.use files +# ->{pkguse} Is either disabled, left alone or enabled by the users package.use file my $_use_temp = undef; my $_use_template = { @@ -609,9 +611,9 @@ sub _read_make_globals { # Analyze EPREFIX/var/db/pkg and analyze all installed -# packages. We need to know what they use (IUSE) and what -# has been set when they where emerged (PKGUSE). -# No parameters accepted. +# packages. The contents of the file IUSE are used to +# enrich the information of the {default} part and to +# determine which packages are installed. sub _read_packages { my $pkgdir = undef; opendir($pkgdir, "${_EPREFIX}/var/db/pkg") @@ -627,7 +629,6 @@ sub _read_packages { # loop through all openable directories in cat while(my $pkg = readdir $catdir) { next if $pkg eq '.' or $pkg eq '..'; -# my @puse = (); my @iuse = (); # Load IUSE to learn which use flags the package in this version knows @@ -638,14 +639,6 @@ sub _read_packages { close $use; } - # Load PKGUSE to learn which use flags have been set when this package was emerged -# my $fpuse = "${_EPREFIX}/var/db/pkg/$cat/$pkg/PKGUSE"; -# if(open my $use, '<', $fpuse) { -# local $/; -# @puse = split ' ', <$use>; -# close $use; -# } - # could be shortened, but make sure not to strip off part of the name $pkg =~ s/-\d+(?:\.\d+)*\w?(?:_(?:alpha|beta|pre|rc|p)\d*)?(?:-r\d+)?$//; $pkg = $cat . "/" . $pkg; @@ -658,18 +651,10 @@ sub _read_packages { _add_temp($flag, "global"); _add_temp($flag, $pkg); - $_use_temp->{$flag}{"local"}{$pkg}{"package"} = $eState ? 1 : $dState ? -1 : 0; + $_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 -# for my $flag (@puse) { -# my $state = $flag =~ s/^-// || 0; -# -# if ( defined($_use_temp->{$flag}{global}) -# && defined($_use_temp->{$flag}{"local"}{$pkg})) { -# $_use_temp->{$flag}{"local"}{$pkg}{"package"} = $state ? -1 : 0; -# } -# } ## End of looping PKGUSE } closedir $catdir;