From 49b73cf5ae2dc946806bb09b1626df326b421e94 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Sun, 19 Apr 2009 00:01:13 +0000 Subject: 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. svn path=/main/trunk/; revision=13361 --- pym/portage/dbapi/porttree.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py index c07cf4ff2..2be49d58f 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) -- cgit v1.2.3-1-g7c22