1 |
Author: idl0r |
2 |
Date: 2010-07-02 15:47:13 +0000 (Fri, 02 Jul 2010) |
3 |
New Revision: 789 |
4 |
|
5 |
Modified: |
6 |
trunk/gentoolkit-dev/ChangeLog |
7 |
trunk/gentoolkit-dev/src/ekeyword/ekeyword |
8 |
Log: |
9 |
ekeyword: Add get_architectures_status function to get the architecture status, |
10 |
0 = unkown, 1 = dev, 2 = exp, 3 = stable. |
11 |
|
12 |
|
13 |
Modified: trunk/gentoolkit-dev/ChangeLog |
14 |
=================================================================== |
15 |
--- trunk/gentoolkit-dev/ChangeLog 2010-07-02 15:34:12 UTC (rev 788) |
16 |
+++ trunk/gentoolkit-dev/ChangeLog 2010-07-02 15:47:13 UTC (rev 789) |
17 |
@@ -10,6 +10,8 @@ |
18 |
available architectures to the %ARCH hash which can be used for |
19 |
validation. |
20 |
Validate user input/arch, bug 326029. |
21 |
+ Add get_architectures_status function to get the architecture status, |
22 |
+ 0 = unkown, 1 = dev, 2 = exp, 3 = stable. |
23 |
|
24 |
2010-05-17: Christian Ruppert <idl0r@g.o> |
25 |
* echangelog: Update copyright in other files too (except binaries and |
26 |
|
27 |
Modified: trunk/gentoolkit-dev/src/ekeyword/ekeyword |
28 |
=================================================================== |
29 |
--- trunk/gentoolkit-dev/src/ekeyword/ekeyword 2010-07-02 15:34:12 UTC (rev 788) |
30 |
+++ trunk/gentoolkit-dev/src/ekeyword/ekeyword 2010-07-02 15:47:13 UTC (rev 789) |
31 |
@@ -60,6 +60,18 @@ |
32 |
} |
33 |
} |
34 |
|
35 |
+sub get_architectures_status() { |
36 |
+ foreach my $line (file_parse("${PORTDIR}/profiles/profiles.desc")) { |
37 |
+ my ($arch, undef, $status) = split(/\s/, $line, 3); |
38 |
+ |
39 |
+ if(defined($ARCH{$arch})) { |
40 |
+ $ARCH{$arch} = 1 if $status eq "dev"; |
41 |
+ $ARCH{$arch} = 2 if $status eq "exp"; |
42 |
+ $ARCH{$arch} = 3 if $status eq "stable"; |
43 |
+ } |
44 |
+ } |
45 |
+} |
46 |
+ |
47 |
# make sure the cmdline consists of keywords and ebuilds |
48 |
unless (@ARGV > 0) { |
49 |
# NOTE: ~all will ignore all -arch keywords |