Use the simpler/stricter _pkgspit in dbapi code.
authorZac Medico <zmedico@gentoo.org>
Sun, 4 Oct 2009 22:06:04 +0000 (22:06 -0000)
committerZac Medico <zmedico@gentoo.org>
Sun, 4 Oct 2009 22:06:04 +0000 (22:06 -0000)
svn path=/main/trunk/; revision=14492

pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py
pym/portage/versions.py

index f7c8288d588e7d76a9262d9bcec2e7741c195317..ef0b8a6942a3a034223b3fde25aeaf05b90a1def 100644 (file)
@@ -12,7 +12,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
        'portage.dep:dep_getkey,match_from_list,paren_reduce,use_reduce',
        'portage.env.loaders:KeyValuePairFileLoader',
        'portage.util:ensure_dirs,writemsg,writemsg_level',
-       'portage.versions:best,catpkgsplit,pkgsplit,ver_regexp',
+       'portage.versions:best,catpkgsplit,_pkgsplit@pkgsplit,ver_regexp',
 )
 
 from portage.cache.cache_errors import CacheError
index 5fdd1ad448d004abf07f8bab8f9dce91e0f7b3b7..5971ca647706c034b391467511023df193779e6a 100644 (file)
@@ -21,7 +21,7 @@ portage.proxy.lazyimport.lazyimport(globals(),
        'portage.util:apply_secpass_permissions,ConfigProtect,ensure_dirs,' + \
                'writemsg,writemsg_level,write_atomic,atomic_ofstream,writedict,' + \
                'grabfile,grabdict,normalize_path,new_protect_filename,getlibpaths',
-       'portage.versions:best,catpkgsplit,catsplit,pkgcmp,pkgsplit',
+       'portage.versions:best,catpkgsplit,catsplit,pkgcmp,_pkgsplit@pkgsplit',
 )
 
 from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, \
index 60e58b894f2cca65c49705009844eff05e3e6c8d..dababe0c7d9fbac13746e38a2befcc1bf9346035 100644 (file)
@@ -229,7 +229,12 @@ def pkgcmp(pkg1, pkg2):
 _pv_re = re.compile('^' + _pv + '$', re.VERBOSE)
 
 def _pkgsplit(mypkg):
-
+       """
+       @param mypkg: pv
+       @return:
+       1. None if input is invalid.
+       2. (pn, ver, rev) if input is pv
+       """
        m = _pv_re.match(mypkg)
        if m is None:
                return None