Gentoo Archives: gentoo-commits

From: "Christian Ruppert (idl0r)" <idl0r@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoolkit r791 - in trunk/gentoolkit-dev: . src/ekeyword
Date: Fri, 02 Jul 2010 16:28:10
Message-Id: 20100702162805.6B2C42CE15@corvid.gentoo.org
1 Author: idl0r
2 Date: 2010-07-02 16:28:04 +0000 (Fri, 02 Jul 2010)
3 New Revision: 791
4
5 Modified:
6 trunk/gentoolkit-dev/ChangeLog
7 trunk/gentoolkit-dev/src/ekeyword/ekeyword
8 Log:
9 ekeyword: Stabilize stable architectures only when using "all", bug 304133.
10
11
12 Modified: trunk/gentoolkit-dev/ChangeLog
13 ===================================================================
14 --- trunk/gentoolkit-dev/ChangeLog 2010-07-02 16:25:56 UTC (rev 790)
15 +++ trunk/gentoolkit-dev/ChangeLog 2010-07-02 16:28:04 UTC (rev 791)
16 @@ -13,6 +13,7 @@
17 Add get_architectures_status function to get the architecture status,
18 0 = unkown, 1 = dev, 2 = exp, 3 = stable.
19 Don't override stable status in get_architectures_status.
20 + Stabilize stable architectures only when using "all", bug 304133.
21
22 2010-05-17: Christian Ruppert <idl0r@g.o>
23 * echangelog: Update copyright in other files too (except binaries and
24
25 Modified: trunk/gentoolkit-dev/src/ekeyword/ekeyword
26 ===================================================================
27 --- trunk/gentoolkit-dev/src/ekeyword/ekeyword 2010-07-02 16:25:56 UTC (rev 790)
28 +++ trunk/gentoolkit-dev/src/ekeyword/ekeyword 2010-07-02 16:28:04 UTC (rev 791)
29 @@ -88,6 +88,7 @@
30
31 $PORTDIR = get_portdir();
32 get_architectures();
33 +get_architectures_status();
34
35 my $files = 0;
36 for my $f (@ARGV) {
37 @@ -146,7 +147,20 @@
38 } else {
39 if ($arch eq 'all') {
40 # modify all non-masked keywords in the list
41 - $quoted =~ s/(^|\s)~?(?=\w)/$1$leader/g;
42 +
43 + # Don't add stable keywords for != stable architectures
44 + if(length($leader) eq 0) {
45 + foreach my $tmp (split(/\s/, $quoted)) {
46 + my (undef, $_arch, undef) = ($tmp =~ m/$kw_re/o);
47 +
48 + if($ARCH{$_arch} and $ARCH{$_arch} eq 3) {
49 + $quoted =~ s/\Q~${_arch}\E/${_arch}/;
50 + }
51 + }
52 + }
53 + else {
54 + $quoted =~ s/(^|\s)~?(?=\w)/$1$leader/g;
55 + }
56 } else {
57 # modify or add keyword
58 unless ($quoted =~ s/[-~]?\Q$arch\E(\s|$)/$leader$arch$1/) {