diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-02-09 03:50:36 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-02-09 03:50:36 +0000 |
commit | 0987a6105e9743b3fd9eaae516db37c598ddd6c6 (patch) | |
tree | 81ebacf287325469c54d6ca0589bc3e5d6efd54f | |
parent | 4734721c1b882ec4fdc004cd0d0490d31b3b31c1 (diff) | |
download | portage-0987a6105e9743b3fd9eaae516db37c598ddd6c6.tar.gz portage-0987a6105e9743b3fd9eaae516db37c598ddd6c6.tar.bz2 portage-0987a6105e9743b3fd9eaae516db37c598ddd6c6.zip |
Use Atom.cp instead of dep_getkey().
svn path=/main/trunk/; revision=15331
-rw-r--r-- | pym/_emerge/create_world_atom.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/pym/_emerge/create_world_atom.py b/pym/_emerge/create_world_atom.py index 1618905c9..2bc1ec542 100644 --- a/pym/_emerge/create_world_atom.py +++ b/pym/_emerge/create_world_atom.py @@ -15,7 +15,7 @@ def create_world_atom(pkg, args_set, root_config): arg_atom = args_set.findAtomForPackage(pkg) if not arg_atom: return None - cp = portage.dep_getkey(arg_atom) + cp = arg_atom.cp new_world_atom = cp sets = root_config.sets portdb = root_config.trees["porttree"].dbapi @@ -76,15 +76,14 @@ def create_world_atom(pkg, args_set, root_config): # can't be safely excluded from world if they are slotted. system_atom = sets["system"].findAtomForPackage(pkg) if system_atom: - if not portage.dep_getkey(system_atom).startswith("virtual/"): + if not system_atom.cp.startswith("virtual/"): return None # System virtuals aren't safe to exclude from world since they can # match multiple old-style virtuals but only one of them will be # pulled in by update or depclean. - providers = portdb.settings.getvirtuals().get( - portage.dep_getkey(system_atom)) + providers = portdb.settings.getvirtuals().get(system_atom.cp) if providers and len(providers) == 1 and \ - portage.dep_getkey(providers[0]) == cp: + providers[0].cp == arg_atom.cp: return None return new_world_atom |