summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-12-02 08:15:17 -0800
committerZac Medico <zmedico@gentoo.org>2010-12-03 22:27:39 -0800
commit85eb01fdb3073638ad5334519342b99b736721a8 (patch)
tree9995001df4b672ce8537d2f6168fc5fad7247aac /pym
parent0148cb947559636fb66958c10f9140c3b5369101 (diff)
downloadportage-85eb01fdb3073638ad5334519342b99b736721a8.tar.gz
portage-85eb01fdb3073638ad5334519342b99b736721a8.tar.bz2
portage-85eb01fdb3073638ad5334519342b99b736721a8.zip
cpv_sort_key: test suffix order
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/versions/test_cpv_sort_key.py4
-rw-r--r--pym/portage/versions.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/tests/versions/test_cpv_sort_key.py b/pym/portage/tests/versions/test_cpv_sort_key.py
index 857af1701..a223d78c7 100644
--- a/pym/portage/tests/versions/test_cpv_sort_key.py
+++ b/pym/portage/tests/versions/test_cpv_sort_key.py
@@ -8,8 +8,8 @@ class CpvSortKeyTestCase(TestCase):
def testCpvSortKey(self):
- tests = [ (( "a", "b", "a/b-2", "a/a-1", "a/b-1"),
- ( "a", "a/a-1", "a/b-1", "a/b-2", "b")),
+ tests = [ (("a/b-2_alpha", "a", "b", "a/b-2", "a/a-1", "a/b-1"),
+ ( "a", "a/a-1", "a/b-1", "a/b-2_alpha", "a/b-2", "b")),
]
for test in tests:
diff --git a/pym/portage/versions.py b/pym/portage/versions.py
index d3271a762..f8691d1ce 100644
--- a/pym/portage/versions.py
+++ b/pym/portage/versions.py
@@ -348,7 +348,7 @@ def cpv_getversion(mycpv):
def cpv_sort_key():
"""
- Create an object for sorting cpvs, to be useed as the 'key' parameter
+ Create an object for sorting cpvs, to be used as the 'key' parameter
in places like list.sort() or sorted(). This calls catpkgsplit() once for
each cpv and caches the result. If a given cpv is invalid or two cpvs
have different category/package names, then plain string (> and <)