than once, like in live ebuilds. Bug 321475.
svn path=/trunk/gentoolkit-dev/; revision=795
+2010-07-03: Christian Ruppert <idl0r@gentoo.org>
+ * ekeyword: Don't touch an empty KEYWORDS variable in case it occurs more
+ than once, like in live ebuilds. Bug 321475.
+
2010-07-03: Christian Ruppert <idl0r@gentoo.org>
* ekeyword: Fix stabilization with "all", bug 304133#c11.
open O, ">$f.new" or die "Can't create $f.new: $!\n";
select O;
+ my $count = 0;
+ while(<I>) {
+ $count++ if m/^\s*KEYWORDS=/;
+ }
+ seek(I, 0, 0);
+
while (<I>) {
if (/^\s*KEYWORDS=/) {
}
(my $quoted = $_) =~ s/^.*?["'](.*?)["'].*/$1/s;
+ if($count > 1 && length($quoted) eq 0) {
+ # Skip empty KEYWORDS variables in case they occur more than
+ # once, bug 321475.
+ print $_;
+ next;
+ }
+
# replace -* with -STAR for our convenience below
$quoted =~ s/-\*/-STAR/;