From 3bdac54db0ca280aff9653141925a7b4efb77973 Mon Sep 17 00:00:00 2001 From: idl0r Date: Sat, 3 Jul 2010 08:56:48 +0000 Subject: [PATCH] ekeyword: Fix stabilization with "all", bug 304133#c11. svn path=/trunk/gentoolkit-dev/; revision=792 --- ChangeLog | 3 +++ src/ekeyword/ekeyword | 15 ++++++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index cea0ce4..6263afd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2010-07-03: Christian Ruppert + * ekeyword: Fix stabilization with "all", bug 304133#c11. + 2010-07-02: Christian Ruppert * imlate: Don't ignore package names without category. * ekeyword: Show "diff -U 0" to cover all changes. diff --git a/src/ekeyword/ekeyword b/src/ekeyword/ekeyword index 293f0cf..9528911 100755 --- a/src/ekeyword/ekeyword +++ b/src/ekeyword/ekeyword @@ -150,13 +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) { - $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; -- 2.26.2