diff options
author | Zac Medico <zmedico@gentoo.org> | 2007-10-28 20:47:02 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2007-10-28 20:47:02 +0000 |
commit | b88012cf376443a75310a7ed971ea98934f80624 (patch) | |
tree | d214d2092443af2760d568ebe28df58086bfb7ef | |
parent | 8b4009ca329545a14173c5491dfe26a247066df2 (diff) | |
download | portage-b88012cf376443a75310a7ed971ea98934f80624.tar.gz portage-b88012cf376443a75310a7ed971ea98934f80624.tar.bz2 portage-b88012cf376443a75310a7ed971ea98934f80624.zip |
Fix --depclean to use SetConfig.getSetAtoms() and also fix a
broken reference to packagesets which is now settings.sets.
svn path=/main/trunk/; revision=8334
-rw-r--r-- | pym/_emerge/__init__.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py index 076ccb3a6..2d97624ef 100644 --- a/pym/_emerge/__init__.py +++ b/pym/_emerge/__init__.py @@ -52,10 +52,8 @@ import portage.exception from portage.data import secpass from portage.util import normalize_path as normpath from portage.util import writemsg -from portage.sets import SetConfig, make_default_config, SETPREFIX -from portage.sets.profiles import PackagesSystemSet as SystemSet +from portage.sets import make_default_config, SETPREFIX from portage.sets.base import InternalPackageSet -from portage.sets.files import WorldSet from itertools import chain, izip from UserDict import DictMixin @@ -5665,10 +5663,8 @@ def action_depclean(settings, trees, ldpath_mtimes, vardb = dep_check_trees[myroot]["vartree"].dbapi # Constrain dependency selection to the installed packages. dep_check_trees[myroot]["porttree"] = dep_check_trees[myroot]["vartree"] - system_set = SystemSet(settings.profiles) - syslist = list(system_set) - world_set = WorldSet(myroot) - worldlist = list(world_set) + syslist = settings.setconfig.getSetAtoms("system") + worldlist = settings.setconfig.getSetAtoms("world") args_set = InternalPackageSet() fakedb = portage.fakedbapi(settings=settings) myvarlist = vardb.cpv_all() @@ -6535,7 +6531,8 @@ def emerge_main(): colorize("INFORM", s) return 1 # TODO: check if the current setname also resolves to a package name - if myaction in ["unmerge", "prune", "clean", "depclean"] and not packagesets[s].supportsOperation("unmerge"): + if myaction in ["unmerge", "prune", "clean", "depclean"] and \ + not settings.sets[s].supportsOperation("unmerge"): print "emerge: the given set %s does not support unmerge operations" % s return 1 if not settings.setconfig.getSetAtoms(s): |