aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2010-07-02 16:28:04 +0000
committeridl0r <idl0r@gentoo.org>2010-07-02 16:28:04 +0000
commitb7e71b73b3ab414be52f7d16eeb24eeba29ef684 (patch)
tree88b2a5e61a6133065f1143f5427683188f146628
parentekeyword: Don't override stable status in get_architectures_status. (diff)
downloadgentoolkit-b7e71b73b3ab414be52f7d16eeb24eeba29ef684.tar.gz
gentoolkit-b7e71b73b3ab414be52f7d16eeb24eeba29ef684.tar.bz2
gentoolkit-b7e71b73b3ab414be52f7d16eeb24eeba29ef684.zip
ekeyword: Stabilize stable architectures only when using "all", bug 304133.
svn path=/trunk/gentoolkit-dev/; revision=791
-rw-r--r--ChangeLog1
-rwxr-xr-xsrc/ekeyword/ekeyword16
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index b9b4d8d..cea0ce4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,7 @@
Add get_architectures_status function to get the architecture status,
0 = unkown, 1 = dev, 2 = exp, 3 = stable.
Don't override stable status in get_architectures_status.
+ Stabilize stable architectures only when using "all", bug 304133.
2010-05-17: Christian Ruppert <idl0r@gentoo.org>
* echangelog: Update copyright in other files too (except binaries and
diff --git a/src/ekeyword/ekeyword b/src/ekeyword/ekeyword
index 044f151..293f0cf 100755
--- a/src/ekeyword/ekeyword
+++ b/src/ekeyword/ekeyword
@@ -88,6 +88,7 @@ for my $a (@ARGV) {
$PORTDIR = get_portdir();
get_architectures();
+get_architectures_status();
my $files = 0;
for my $f (@ARGV) {
@@ -146,7 +147,20 @@ for my $f (@ARGV) {
} else {
if ($arch eq 'all') {
# modify all non-masked keywords in the list
- $quoted =~ s/(^|\s)~?(?=\w)/$1$leader/g;
+
+ # Don't add stable keywords for != stable architectures
+ if(length($leader) eq 0) {
+ foreach my $tmp (split(/\s/, $quoted)) {
+ my (undef, $_arch, undef) = ($tmp =~ m/$kw_re/o);
+
+ if($ARCH{$_arch} and $ARCH{$_arch} eq 3) {
+ $quoted =~ s/\Q~${_arch}\E/${_arch}/;
+ }
+ }
+ }
+ else {
+ $quoted =~ s/(^|\s)~?(?=\w)/$1$leader/g;
+ }
} else {
# modify or add keyword
unless ($quoted =~ s/[-~]?\Q$arch\E(\s|$)/$leader$arch$1/) {