Fix keyword comparison bug v2.0.8
authorMike Pagano <mpagano@gentoo.org>
Thu, 11 Nov 2010 15:16:25 +0000 (10:16 -0500)
committerMike Pagano <mpagano@gentoo.org>
Thu, 11 Nov 2010 15:16:25 +0000 (10:16 -0500)
portpeek

index f633b9babd469d44191088e5040417414bc4a480..4c91b4a04eee2c057462ff7fff46f11746f2ad04 100755 (executable)
--- a/portpeek
+++ b/portpeek
@@ -16,7 +16,7 @@
 
 __author__ = "Michael Pagano"
 __email__ = "mpagano@gentoo.org"
-__version__ = "2.0.7"
+__version__ = "2.0.8"
 __productname__ = "portpeek"
 __description__ = "Displays user unmasked ebuilds and installable options from the portage tree"
 
@@ -530,7 +530,10 @@ def filter_keywords(keywords):
         key = str.replace(key, "]", "")
         key = str.replace(key, ",", "")
         arch=settings["ARCH"]
-        if key.rfind(arch) != -1:
+
+        # remove '~' from key for comparison
+        key_comparison = key.lstrip('~')
+        if key_comparison == arch:
             if len(filtered_keywords) != 0:
                 filtered_keywords = filtered_keywords + " "
             filtered_keywords = filtered_keywords + key