From: fuzzyray Date: Wed, 22 Sep 2010 21:11:52 +0000 (-0000) Subject: Merge from genscripts r458: douglasjanderson X-Git-Tag: gentoolkit-0.3.0_rc11~30 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=e9eed87af35cd91ff7058b43c902fe2fc1b0e82f;p=gentoolkit.git Merge from genscripts r458: douglasjanderson 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 --- diff --git a/pym/gentoolkit/equery/meta.py b/pym/gentoolkit/equery/meta.py index eb63102..b67cbc6 100644 --- a/pym/gentoolkit/equery/meta.py +++ b/pym/gentoolkit/equery/meta.py @@ -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) diff --git a/pym/gentoolkit/keyword.py b/pym/gentoolkit/keyword.py index 217a396..057f77c 100644 --- a/pym/gentoolkit/keyword.py +++ b/pym/gentoolkit/keyword.py @@ -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 "".format(self) + return "<{0.__class__.__name__} {0.keyword!r}>".format(self) # ========= # Functions diff --git a/pym/gentoolkit/metadata.py b/pym/gentoolkit/metadata.py index d9ff678..f1099ac 100644 --- a/pym/gentoolkit/metadata.py +++ b/pym/gentoolkit/metadata.py @@ -33,9 +33,6 @@ 'Thomas Mills Hinkle' """ -# Move to Imports section after Python-2.6 is stable - - __all__ = ('MetaData',) __docformat__ = 'epytext' diff --git a/pym/gentoolkit/package.py b/pym/gentoolkit/package.py index 4471d2d..70f05d6 100644 --- a/pym/gentoolkit/package.py +++ b/pym/gentoolkit/package.py @@ -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: