1 |
Author: zmedico |
2 |
Date: 2009-04-30 07:18:41 +0000 (Thu, 30 Apr 2009) |
3 |
New Revision: 13517 |
4 |
|
5 |
Modified: |
6 |
main/branches/2.1.6/pym/portage/dbapi/porttree.py |
7 |
Log: |
8 |
If a repo doesn't have metadata/layout.conf then use either missing eclass |
9 |
directory or missing profiles/profiles.desc to trigger assignment of a default |
10 |
master. (trunk r13361) |
11 |
|
12 |
Modified: main/branches/2.1.6/pym/portage/dbapi/porttree.py |
13 |
=================================================================== |
14 |
--- main/branches/2.1.6/pym/portage/dbapi/porttree.py 2009-04-30 07:18:20 UTC (rev 13516) |
15 |
+++ main/branches/2.1.6/pym/portage/dbapi/porttree.py 2009-04-30 07:18:41 UTC (rev 13517) |
16 |
@@ -254,10 +254,12 @@ |
17 |
porttrees.append(master_path) |
18 |
|
19 |
if not porttrees: |
20 |
- # Make PORTDIR the default master, but only if this |
21 |
- # repo doesn't provide profiles.desc itself. |
22 |
+ # Make PORTDIR the default master, but only if our |
23 |
+ # heuristics suggest that it's necessary. |
24 |
profiles_desc = os.path.join(path, 'profiles', 'profiles.desc') |
25 |
- if not os.path.exists(profiles_desc): |
26 |
+ eclass_dir = os.path.join(path, 'eclass') |
27 |
+ if not os.path.isfile(profiles_desc) or \ |
28 |
+ not os.path.isdir(eclass_dir): |
29 |
porttrees.append(porttree_root) |
30 |
|
31 |
porttrees.append(path) |