1 |
commit: 1918d93f84127f9ba2142e7d03ec0d38b2705d10 |
2 |
Author: Sven Eden <sven.eden <AT> gmx <DOT> de> |
3 |
AuthorDate: Fri Feb 1 15:55:58 2013 +0000 |
4 |
Commit: Sven Eden <sven.eden <AT> gmx <DOT> de> |
5 |
CommitDate: Fri Feb 1 15:55:58 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/ufed.git;a=commit;h=1918d93f |
7 |
|
8 |
Fixed a bug that caused ufed to "forget" all enabled flags from make.conf if the flag had only local descriptions. |
9 |
|
10 |
--- |
11 |
Portage.pm | 8 ++++---- |
12 |
1 files changed, 4 insertions(+), 4 deletions(-) |
13 |
|
14 |
diff --git a/Portage.pm b/Portage.pm |
15 |
index 933d4d1..1d7a800 100644 |
16 |
--- a/Portage.pm |
17 |
+++ b/Portage.pm |
18 |
@@ -172,7 +172,7 @@ sub _add_flag |
19 |
} else { |
20 |
%{$use_flags->{$flag}{"local"}{$pkg}} = %data; |
21 |
} |
22 |
- ++$use_flags->{$flag}{count}; |
23 |
+ ++$use_flags->{$flag}{count} if (length($descr)); |
24 |
|
25 |
|
26 |
} else { |
27 |
@@ -198,6 +198,7 @@ sub _add_temp |
28 |
defined ($_use_temp->{$flag}{global}) |
29 |
or %{$_use_temp->{$flag}{global}} = %$_use_template; |
30 |
} else { |
31 |
+ _add_temp($flag, "global"); ## This must exist! |
32 |
defined ($_use_temp->{$flag}{"local"}{$pkg}) |
33 |
or %{$_use_temp->{$flag}{"local"}{$pkg}} = %$_use_template; |
34 |
} |
35 |
@@ -304,8 +305,8 @@ sub _gen_use_flags |
36 |
for my $flag (keys %$_use_temp) { |
37 |
my %descCons = (); |
38 |
my $flagRef = $_use_temp->{$flag}; ## Shortcut |
39 |
- my $hasGlobal= (defined($flagRef->{global}) && length($flagRef->{global}{descr})) ? 1 : 0; |
40 |
- my $lCount = $hasGlobal; |
41 |
+ my $hasGlobal= defined($flagRef->{global}) ? 1 : 0; |
42 |
+ my $lCount = ($hasGlobal && length($flagRef->{global}{desc})) ? 1 : 0; |
43 |
my $gDesc = ""; |
44 |
my $gKey = ""; |
45 |
my $gRef = $flagRef->{global}; |
46 |
@@ -523,7 +524,6 @@ sub _read_make_conf { |
47 |
|
48 |
# Note the conf state of the read flags: |
49 |
for my $flag ( keys %{$oldEnv{USE}}) { |
50 |
- |
51 |
_add_temp($flag, "global"); |
52 |
|
53 |
$oldEnv{USE}{$flag} |