Merge from genscripts r458: douglasjanderson
authorfuzzyray <fuzzyray@gentoo.org>
Wed, 22 Sep 2010 21:11:52 +0000 (21:11 -0000)
committerfuzzyray <fuzzyray@gentoo.org>
Wed, 22 Sep 2010 21:11:52 +0000 (21:11 -0000)
Fix for bug #303129: equery meta's keyword sorting should match ekeyword.

Merge from genscripts r455: douglasjanderson
Small backend and source mods.

Merge from genscripts r432: brian.dolbec
fix Bug 317899 traceback due to incorrectly using pass instead of continue in
two locations.

Merge from genscripts r426: andkit
add $mask2 to the list of allowed placeholders for --help.

svn path=/trunk/gentoolkit/; revision=804

pym/gentoolkit/equery/meta.py
pym/gentoolkit/keyword.py
pym/gentoolkit/metadata.py
pym/gentoolkit/package.py

index eb63102c6c83c24ded794f2010a3f06f6e759e0c..b67cbc6db8792421979981e5a8149c3a0702f99a 100644 (file)
@@ -217,7 +217,7 @@ def format_keywords(keywords):
 
        result = []
 
-       for kw in sorted(keywords, key=keyword.Keyword):
+       for kw in sorted(keywords, keyword.compare_strs):
                if kw.startswith('-'):
                        # arch masked
                        kw = pp.keyword(kw, stable=False, hard_masked=True)
index 217a3961901476d8ba7ab8a8eb78b88bb3c63293..057f77c54b2999de1a2207e52dd3f382a28e423f 100644 (file)
@@ -15,7 +15,7 @@ __all__ = (
        'Keyword',
        'compare_strs',
        'reduce_keywords',
-       'determine_keywords'
+       'determine_keyword'
 )
 
 # =======
@@ -66,7 +66,7 @@ class Keyword(object):
                return self.keyword
 
        def __repr__(self):
-               return "<Keyword {0.keyword!r}>".format(self)
+               return "<{0.__class__.__name__} {0.keyword!r}>".format(self)
 
 # =========
 # Functions
index d9ff67869b762e9e30aa907316ccbe29e3b95303..f1099accbb707de0165b39e7e28877990848f5c4 100644 (file)
@@ -33,9 +33,6 @@
                'Thomas Mills Hinkle'
 """
 
-# Move to Imports section after Python-2.6 is stable
-
-
 __all__ = ('MetaData',)
 __docformat__ = 'epytext'
 
index 4471d2d046cc0263408755d449d7f50ab3007088..70f05d69d97f5aa8057a20351b7b1422a9c6a670 100644 (file)
@@ -344,12 +344,12 @@ class Package(CPV):
                        try:
                                st = os.lstat(f)
                        except OSError:
-                               pass
+                               continue
 
                        # Remove hardlinks by checking for duplicate inodes. Bug #301026.
                        file_inode = st.st_ino
                        if file_inode in seen:
-                               pass
+                               continue
                        seen.add(file_inode)
 
                        try: