From: "Sven Eden" <sven.eden@gmx.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/ufed:master commit in: /
Date: Tue, 12 Feb 2013 09:01:17 +0000 (UTC) [thread overview]
Message-ID: <1360439622.42d1d806290ca8e0adc6fd9f3111c0dd11c24b1c.yamakuzure@gentoo> (raw)
commit: 42d1d806290ca8e0adc6fd9f3111c0dd11c24b1c
Author: Sven Eden <sven.eden <AT> gmx <DOT> de>
AuthorDate: Sat Feb 9 19:53:42 2013 +0000
Commit: Sven Eden <sven.eden <AT> gmx <DOT> 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;
next reply other threads:[~2013-02-12 9:01 UTC|newest]
Thread overview: 238+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 9:01 Sven Eden [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-11-07 14:25 [gentoo-commits] proj/ufed:master commit in: / Sven Eden
2020-05-02 8:38 Ulrich Müller
2019-09-27 6:42 Sven Eden
2019-09-27 6:39 Sven Eden
2019-09-24 17:57 Sven Eden
2019-09-24 17:56 Sven Eden
2019-04-07 15:17 David Seifert
2019-04-07 13:56 David Seifert
2019-04-07 13:19 David Seifert
2019-04-07 13:19 David Seifert
2019-04-07 13:19 David Seifert
2019-04-07 13:19 David Seifert
2019-04-07 13:19 David Seifert
2015-02-12 15:47 Sven Eden
2015-02-11 9:03 Sven Eden
2014-11-10 9:59 Sven Eden
2014-10-28 11:43 Sven Eden
2014-02-26 10:26 Sven Eden
2014-02-26 10:26 Sven Eden
2014-02-26 10:26 Sven Eden
2014-02-26 10:26 Sven Eden
2014-02-26 10:26 Sven Eden
2014-02-26 10:26 Sven Eden
2014-02-25 8:18 Sven Eden
2014-02-25 8:18 Sven Eden
2014-02-25 8:18 Sven Eden
2014-02-25 8:18 Sven Eden
2013-11-25 21:43 Sven Eden
2013-11-25 21:43 Sven Eden
2013-11-25 21:43 Sven Eden
2013-11-25 21:43 Sven Eden
2013-11-25 21:43 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-20 8:30 Sven Eden
2013-09-11 7:09 Sven Eden
2013-09-11 6:31 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-11 6:04 Sven Eden
2013-09-10 12:37 Sven Eden
2013-09-10 6:36 Sven Eden
2013-09-10 6:36 Sven Eden
2013-09-10 6:36 Sven Eden
2013-09-10 6:36 Sven Eden
2013-09-10 6:36 Sven Eden
2013-09-10 6:36 Sven Eden
2013-09-10 6:36 Sven Eden
2013-07-22 9:34 Sven Eden
2013-07-22 6:09 Sven Eden
2013-07-22 6:09 Sven Eden
2013-04-09 7:22 Sven Eden
2013-04-09 7:22 Sven Eden
2013-04-09 7:22 Sven Eden
2013-04-08 7:18 Sven Eden
2013-04-03 13:39 Sven Eden
2013-03-05 16:53 Sven Eden
2013-03-05 16:49 Sven Eden
2013-03-05 16:49 Sven Eden
2013-03-05 16:49 Sven Eden
2013-03-05 16:49 Sven Eden
2013-03-05 16:49 Sven Eden
2013-02-21 10:02 Sven Eden
2013-02-19 15:16 Sven Eden
2013-02-19 13:34 Sven Eden
2013-02-18 7:22 Sven Eden
2013-02-15 8:36 Sven Eden
2013-02-15 8:36 Sven Eden
2013-02-15 8:36 Sven Eden
2013-02-14 8:35 Sven Eden
2013-02-14 8:35 Sven Eden
2013-02-14 8:35 Sven Eden
2013-02-13 9:23 Sven Eden
2013-02-13 9:23 Sven Eden
2013-02-13 9:23 Sven Eden
2013-02-13 9:23 Sven Eden
2013-02-13 9:23 Sven Eden
2013-02-12 10:51 Sven Eden
2013-02-12 10:51 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-12 9:01 Sven Eden
2013-02-06 9:09 Sven Eden
2013-02-06 9:09 Sven Eden
2013-02-05 18:06 Paul Varner
2013-02-05 13:53 Sven Eden
2013-02-05 13:53 Sven Eden
2013-02-05 11:24 Sven Eden
2013-02-03 14:32 Sven Eden
2013-02-03 14:32 Sven Eden
2013-02-03 14:32 Sven Eden
2013-02-03 14:32 Sven Eden
2013-02-03 14:32 Sven Eden
2013-02-02 20:49 Sven Eden
2013-02-02 10:11 Sven Eden
2013-02-02 9:47 Sven Eden
2013-02-02 9:47 Sven Eden
2013-02-02 9:47 Sven Eden
2013-02-01 21:12 Sven Eden
2013-02-01 21:12 Sven Eden
2013-02-01 21:12 Sven Eden
2013-02-01 16:04 Sven Eden
2013-02-01 15:55 Sven Eden
2013-02-01 15:26 Sven Eden
2013-02-01 14:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-02-01 10:49 Sven Eden
2013-01-24 10:15 Sven Eden
2013-01-24 10:15 Sven Eden
2013-01-24 10:15 Sven Eden
2013-01-24 10:15 Sven Eden
2013-01-24 10:15 Sven Eden
2013-01-23 14:44 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-23 12:05 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-19 21:43 Sven Eden
2013-01-16 13:43 Sven Eden
2013-01-16 12:56 Sven Eden
2013-01-16 12:56 Sven Eden
2013-01-16 12:56 Sven Eden
2013-01-16 12:56 Sven Eden
2013-01-16 12:56 Sven Eden
2013-01-16 12:56 Sven Eden
2013-01-08 11:02 Sven Eden
2013-01-02 8:47 Sven Eden
2013-01-02 8:01 Sven Eden
2013-01-02 8:01 Sven Eden
2012-11-20 17:31 Paul Varner
2012-11-20 17:25 Paul Varner
2012-10-23 16:13 Paul Varner
2012-10-23 16:13 Paul Varner
2012-10-23 16:13 Paul Varner
2012-10-23 16:01 Paul Varner
2012-10-22 20:42 Paul Varner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360439622.42d1d806290ca8e0adc6fd9f3111c0dd11c24b1c.yamakuzure@gentoo \
--to=sven.eden@gmx.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox