aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2010-07-03 09:53:46 +0000
committeridl0r <idl0r@gentoo.org>2010-07-03 09:53:46 +0000
commit19827fe8ece88c99b9c4e7d0b6834fbcfa72e03c (patch)
tree29c3b9e86766a6d9fd732dc1b3561c01dd4187ae
parentekeyword: Simplify r791 / bug 304133#c11. (diff)
downloadgentoolkit-19827fe8ece88c99b9c4e7d0b6834fbcfa72e03c.tar.gz
gentoolkit-19827fe8ece88c99b9c4e7d0b6834fbcfa72e03c.tar.bz2
gentoolkit-19827fe8ece88c99b9c4e7d0b6834fbcfa72e03c.zip
Revert last commit.
svn path=/trunk/gentoolkit-dev/; revision=794
-rwxr-xr-xsrc/ekeyword/ekeyword17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/ekeyword/ekeyword b/src/ekeyword/ekeyword
index 6e75e22..9528911 100755
--- a/src/ekeyword/ekeyword
+++ b/src/ekeyword/ekeyword
@@ -150,15 +150,22 @@ for my $f (@ARGV) {
# Don't add stable keywords for != stable architectures
if(length($leader) eq 0) {
+ my @new;
foreach my $tmp (split(/\s/, $quoted)) {
- my (undef, $_arch, undef) = ($tmp =~ m/$kw_re/o);
+ my ($_leader, $_arch, undef) = ($tmp =~ m/$kw_re/o);
+ $_leader = "" if !defined($_leader);
+ $_arch = "" if !defined($_arch);
- if($ARCH{$_arch} and $ARCH{$_arch} eq 3) {
- # [^-] to ignore ~arch-foo in case just arch shall
- # be stabilized, bug 304133#c11
- $quoted =~ s/\Q~${_arch}\E[^-]/${_arch}/;
+ if($_leader eq "~" && ($ARCH{$_arch} && $ARCH{$_arch} eq 3) ) {
+ push(@new, $_arch);
+ next;
+ }
+ else {
+ push(@new, "${_leader}${_arch}");
+ next;
}
}
+ $quoted = join(" ", @new);
}
else {
$quoted =~ s/(^|\s)~?(?=\w)/$1$leader/g;