summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-07 01:27:54 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-07 01:27:54 +0000
commitf16aee82cefa95e9903fa46f448d30f6d4350f64 (patch)
treefd75003af07a254c78e6c1d803a32b3061e5a602 /pym
parent21b7ca34a578c223e481817b6567332a5043153c (diff)
downloadportage-f16aee82cefa95e9903fa46f448d30f6d4350f64.tar.gz
portage-f16aee82cefa95e9903fa46f448d30f6d4350f64.tar.bz2
portage-f16aee82cefa95e9903fa46f448d30f6d4350f64.zip
Add support to repoman for using layout.conf to control which repositories
are used to satisfy dependencies. Thanks to Alistair Bush <ali_bush@g.o> for the initial patch. See the "QA Overlay Layout support" thread on the gentoo-dev mailing list for more information: http://archives.gentoo.org/gentoo-dev/msg_33c61550b4ed2b7b25dd5a4110e1ec81.xml svn path=/main/trunk/; revision=13295
Diffstat (limited to 'pym')
-rw-r--r--pym/_emerge/__init__.py5
-rw-r--r--pym/portage/dbapi/porttree.py12
2 files changed, 15 insertions, 2 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 772a97de4..5ac88b11d 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -770,7 +770,10 @@ class RootConfig(object):
self.iuse_implicit = tuple(sorted(settings._get_implicit_iuse()))
self.root = self.settings["ROOT"]
self.setconfig = setconfig
- self.sets = self.setconfig.getSets()
+ if setconfig is None:
+ self.sets = {}
+ else:
+ self.sets = self.setconfig.getSets()
self.visible_pkgs = PackageVirtualDbapi(self.settings)
def create_world_atom(pkg, args_set, root_config):
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 29f1fe996..3cd8b2acb 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -190,8 +190,14 @@ class portdbapi(dbapi):
level=logging.ERROR, noiselevel=-1)
else:
porttrees.append(master_path)
+
if not porttrees:
- porttrees.append(porttree_root)
+ # Make PORTDIR the default master, but only if this
+ # repo doesn't provide profiles.desc itself.
+ profiles_desc = os.path.join(path, 'profiles', 'profiles.desc')
+ if not os.path.exists(profiles_desc):
+ porttrees.append(porttree_root)
+
porttrees.append(path)
eclass_db = None
@@ -227,11 +233,15 @@ class portdbapi(dbapi):
db_ro=db_ro)
else:
for x in self.porttrees:
+ if x in self.auxdb:
+ continue
# location, label, auxdbkeys
self.auxdb[x] = self.auxdbmodule(
self.depcachedir, x, filtered_auxdbkeys, gid=portage_gid)
if "metadata-transfer" not in self.mysettings.features:
for x in self.porttrees:
+ if x in self._pregen_auxdb:
+ continue
if os.path.isdir(os.path.join(x, "metadata", "cache")):
self._pregen_auxdb[x] = self.metadbmodule(
x, "metadata/cache", filtered_auxdbkeys, readonly=True)