the SetConfig constructor with a config for just system and world sets.
svn path=/main/branches/2.1.6/; revision=11877
self.not_installed = []
self.invalid_category = []
self.okay = []
- from portage.sets import load_default_config
+ from portage._sets import load_default_config
setconfig = load_default_config(portage.settings,
portage.db[portage.settings["ROOT"]])
self._sets = setconfig.getSets()
self.found = os.access(self.world_file, os.R_OK)
vardb = portage.db[myroot]["vartree"].dbapi
- from portage.sets import SETPREFIX
+ from portage._sets import SETPREFIX
sets = self._sets
world_atoms = list(sets["world"])
maxval = len(world_atoms)
from repoman import utilities
from _emerge import Package, RootConfig
-from portage.sets import load_default_config
+from portage._sets import load_default_config
import portage.checksum
import portage.const
from portage.elog.messages import eerror
from portage.util import normalize_path as normpath
from portage.util import writemsg, writemsg_level
-from portage.sets import load_default_config, SETPREFIX
-from portage.sets.base import InternalPackageSet
+from portage._sets import load_default_config, SETPREFIX
+from portage._sets.base import InternalPackageSet
from itertools import chain, izip
from UserDict import DictMixin
vartree.dbapi.flush_cache()
portage.locks.unlockdir(vdb_lock)
- from portage.sets.base import EditablePackageSet
+ from portage._sets.base import EditablePackageSet
# generate a list of package sets that are directly or indirectly listed in "world",
# as there is no persistent list of "installed" sets
class SetConfig(object):
def __init__(self, paths, settings, trees):
self._parser = SafeConfigParser()
- self._parser.read(paths)
+ #self._parser.read(paths)
+ # The "paths" argument is ignored and the config for
+ # system and world sets is hardcoded below.
+ parser = self._parser
+
+ parser.add_section("system")
+ parser.set("system", "class", "portage._sets.profiles.PackagesSystemSet")
+ parser.set("system", "world-candidate", "False")
+
+ parser.add_section("world")
+ parser.set("world", "class", "portage._sets.files.WorldSet")
+ parser.set("world", "world-candidate", "False")
+
self.errors = []
self.psets = {}
self.trees = trees
for sname in parser.sections():
# find classname for current section, default to file based sets
if not parser.has_option(sname, "class"):
- classname = "portage.sets.files.StaticFileSet"
+ classname = "portage._sets.files.StaticFileSet"
else:
classname = parser.get(sname, "class")
setclass = load_mod(classname)
except (ImportError, AttributeError):
try:
- setclass = load_mod("portage.sets."+classname)
+ setclass = load_mod("portage._sets."+classname)
except (ImportError, AttributeError):
self.errors.append("Could not import '%s' for section '%s'" % (classname, sname))
continue
from portage.versions import catpkgsplit, catsplit, pkgcmp, best
from portage.dep import Atom
-from portage.sets.base import PackageSet
-from portage.sets import SetConfigError, get_boolean
+from portage._sets.base import PackageSet
+from portage._sets import SetConfigError, get_boolean
__all__ = ["CategorySet", "DowngradeSet",
"EverythingSet", "OwnerSet", "VariableSet"]
from portage.const import PRIVATE_PATH, USER_CONFIG_PATH
from portage.locks import lockfile, unlockfile
from portage import portage_gid
-from portage.sets.base import PackageSet, EditablePackageSet
-from portage.sets import SetConfigError, SETPREFIX, get_boolean
+from portage._sets.base import PackageSet, EditablePackageSet
+from portage._sets import SetConfigError, SETPREFIX, get_boolean
from portage.env.loaders import ItemFileLoader, KeyListFileLoader
from portage.env.validators import ValidAtomValidator
from portage import dep_getkey, cpv_getkey
# Distributed under the terms of the GNU General Public License v2
# $Id$
-from portage.sets.base import PackageSet
-from portage.sets import get_boolean
+from portage._sets.base import PackageSet
+from portage._sets import get_boolean
from portage.versions import catpkgsplit
class LibraryConsumerSet(PackageSet):
import logging
import os
from portage.util import grabfile_package, stack_lists
-from portage.sets.base import PackageSet
-from portage.sets import get_boolean
+from portage._sets.base import PackageSet
+from portage._sets import get_boolean
from portage.util import writemsg_level
__all__ = ["PackagesSystemSet"]
import os
import portage.glsa as glsa
from portage.util import grabfile, write_atomic
-from portage.sets.base import PackageSet
+from portage._sets.base import PackageSet
from portage.versions import catpkgsplit, pkgcmp
-from portage.sets import get_boolean
+from portage._sets import get_boolean
__all__ = ["SecuritySet", "NewGlsaSet", "NewAffectedSet", "AffectedSet"]
import subprocess
import os
-from portage.sets.base import PackageSet
-from portage.sets import SetConfigError
+from portage._sets.base import PackageSet
+from portage._sets import SetConfigError
__all__ = ["CommandOutputSet"]
import tempfile, os
from portage.tests import TestCase, test_cps
-from portage.sets.files import ConfigFileSet
+from portage._sets.files import ConfigFileSet
class ConfigFileSetTestCase(TestCase):
"""Simple Test Case for ConfigFileSet"""
import tempfile, os
from portage.tests import TestCase, test_cps
-from portage.sets.files import StaticFileSet
+from portage._sets.files import StaticFileSet
from portage.env.loaders import TestTextLoader
from portage.env.config import ConfigLoaderKlass
from portage.process import find_binary
from portage.tests import TestCase, test_cps
-from portage.sets.shell import CommandOutputSet
+from portage._sets.shell import CommandOutputSet
class CommandOutputSetTestCase(TestCase):
"""Simple Test Case for CommandOutputSet"""