diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-10-30 22:44:55 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-10-30 22:44:55 +0000 |
commit | 22061b4f35bb49e39bce95862d1b458ca2b8afd4 (patch) | |
tree | cc426ae9713f88def067e894894e8c36a38539a9 | |
parent | 462f6a4ebd813d5e281da4dbfd7286c34edd2771 (diff) | |
download | portage-22061b4f35bb49e39bce95862d1b458ca2b8afd4.tar.gz portage-22061b4f35bb49e39bce95862d1b458ca2b8afd4.tar.bz2 portage-22061b4f35bb49e39bce95862d1b458ca2b8afd4.zip |
Use portage.const.PORTAGE_PACKAGE_ATOM where appropriate.
svn path=/main/trunk/; revision=11758
-rw-r--r-- | pym/_emerge/__init__.py | 6 | ||||
-rw-r--r-- | pym/portage/dbapi/vartree.py | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index bbfd07397..2cf7d1329 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -11753,9 +11753,11 @@ def action_sync(settings, trees, mtimedb, myopts, myaction): portdb = trees[settings["ROOT"]]["porttree"].dbapi root_config = trees[settings["ROOT"]]["root_config"] - mybestpv = portdb.xmatch("bestmatch-visible", "sys-apps/portage") + mybestpv = portdb.xmatch("bestmatch-visible", + portage.const.PORTAGE_PACKAGE_ATOM) mypvs = portage.best( - trees[settings["ROOT"]]["vartree"].dbapi.match("sys-apps/portage")) + trees[settings["ROOT"]]["vartree"].dbapi.match( + portage.const.PORTAGE_PACKAGE_ATOM)) chk_updated_cfg_files("/", settings.get("CONFIG_PROTECT","").split()) diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py index e79e4d597..d249a71d7 100644 --- a/pym/portage/dbapi/vartree.py +++ b/pym/portage/dbapi/vartree.py @@ -8,11 +8,11 @@ __all__ = ["PreservedLibsRegistry", "LinkageMap", from portage.checksum import perform_md5 from portage.const import CACHE_PATH, CONFIG_MEMORY_FILE, \ - PRIVATE_PATH, VDB_PATH + PORTAGE_PACKAGE_ATOM, PRIVATE_PATH, VDB_PATH from portage.data import portage_gid, portage_uid, secpass from portage.dbapi import dbapi from portage.dep import use_reduce, paren_reduce, isvalidatom, \ - isjustname, dep_getkey + isjustname, dep_getkey, match_from_list from portage.exception import InvalidData, InvalidPackageName, \ FileNotFound, PermissionDenied, UnsupportedAPIException from portage.locks import lockdir, unlockdir @@ -3248,8 +3248,7 @@ class dblink(object): # PORTAGE_BIN_PATH that will be removed when we return. reinstall_self = False if self.myroot == "/" and \ - "sys-apps" == self.cat and \ - "portage" == pkgsplit(self.pkg)[0]: + match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]): reinstall_self = True autoclean = self.settings.get("AUTOCLEAN", "yes") == "yes" @@ -3636,8 +3635,7 @@ class dblink(object): if self.vartree.dbapi._categories is not None: self.vartree.dbapi._categories = None if self.myroot == "/" and \ - "sys-apps" == self.cat and \ - "portage" == pkgsplit(self.pkg)[0]: + match_from_list(PORTAGE_PACKAGE_ATOM, [self.mycpv]): settings = self.settings base_path_orig = os.path.dirname(settings["PORTAGE_BIN_PATH"]) from tempfile import mkdtemp |