summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-30 07:18:41 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-30 07:18:41 +0000
commit69817ddc12ea1952e831d80eaf69a314e8f9b496 (patch)
tree71e85926194907ac348a17745953b0f4cb5c3626
parentHandle IOError from codecs.open(). (trunk r13360) (diff)
downloadportage-multirepo-69817ddc12ea1952e831d80eaf69a314e8f9b496.tar.gz
portage-multirepo-69817ddc12ea1952e831d80eaf69a314e8f9b496.tar.bz2
portage-multirepo-69817ddc12ea1952e831d80eaf69a314e8f9b496.zip
If a repo doesn't have metadata/layout.conf then use either missing eclass
directory or missing profiles/profiles.desc to trigger assignment of a default master. (trunk r13361) svn path=/main/branches/2.1.6/; revision=13517
-rw-r--r--pym/portage/dbapi/porttree.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index c07cf4ff..2be49d58 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -254,10 +254,12 @@ class portdbapi(dbapi):
porttrees.append(master_path)
if not porttrees:
- # Make PORTDIR the default master, but only if this
- # repo doesn't provide profiles.desc itself.
+ # Make PORTDIR the default master, but only if our
+ # heuristics suggest that it's necessary.
profiles_desc = os.path.join(path, 'profiles', 'profiles.desc')
- if not os.path.exists(profiles_desc):
+ eclass_dir = os.path.join(path, 'eclass')
+ if not os.path.isfile(profiles_desc) or \
+ not os.path.isdir(eclass_dir):
porttrees.append(porttree_root)
porttrees.append(path)