commit:     42c7aba9fcb5d8f28d1b778812f6eec6c352012d
Author:     Alex Legler <a3li <AT> gentoo <DOT> org>
AuthorDate: Wed May 18 21:02:37 2011 +0000
Commit:     Pavlos Ratis <dastergon <AT> gentoo <DOT> org>
CommitDate: Wed May 18 21:02:37 2011 +0000
URL:        
http://git.overlays.gentoo.org/gitweb/?p=proj/security.git;a=commit;h=42c7aba9

filter -* keywords

svn path=/; revision=2229

---
 bin/target | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/bin/target b/bin/target
index 22001dd..701886c 100755
--- a/bin/target
+++ b/bin/target
@@ -110,7 +110,7 @@ module GenSec
                                already_stable = []
                        end
 
-                       need_stable = metadata[:stable_arches] - NOSTABLE_ARCHES
+                       need_stable = 
filter_negative_keywords(metadata[:stable_arches] - NOSTABLE_ARCHES)
 
                        i("Arches this package was ever stable on: 
#{$ui.color(need_stable.join(', '), :red, :bold)}") unless $opts[:quiet]
 
@@ -130,7 +130,7 @@ module GenSec
                                msg += "=%s-%s\n" % [metadata[:package], 
best_version]
                        end
 
-                       msg += "Target keywords : \"%s\"\n" % 
metadata[:stable_arches].join(' ')
+                       msg += "Target keywords : \"%s\"\n" % 
need_stable.join(' ')
 
                        if already_stable.length > 0 and not $opts[:prestable]
                                msg += "Already stable  : \"%s\"\n" % 
(already_stable.join(' '))
@@ -335,7 +335,11 @@ module GenSec
                end
 
                def filter_unstable(ary)
-                       ary.reject {|item| item =~ /^~/}
+                       ary.reject {|item| item =~ /^[~-]/}
+               end
+
+               def filter_negative_keywords(ary)
+                       ary.reject {|item| item =~ /^[-]/}
                end
        end
 end

Reply via email to