summaryrefslogtreecommitdiffstats
path: root/pym/portage/cache/metadata.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2009-04-06 22:25:15 +0000
committerZac Medico <zmedico@gentoo.org>2009-04-06 22:25:15 +0000
commit2bd2620142d15344f32ef67896c4fa88e5386953 (patch)
treee65dffa019d22454a0bf776c9f4a0b19dce5bfa9 /pym/portage/cache/metadata.py
parent1ad3342b49e9d488a9beba86ea7096c68c6b1f44 (diff)
downloadportage-2bd2620142d15344f32ef67896c4fa88e5386953.tar.gz
portage-2bd2620142d15344f32ef67896c4fa88e5386953.tar.bz2
portage-2bd2620142d15344f32ef67896c4fa88e5386953.zip
Add portdbapi support for a metadata/layout.conf file which
specifies information about the repository layout. Currently, only a single "masters" attribute is supported, which is used to specify names of repositories which satisfy dependencies on eclasses and/or ebuilds. Each repository name should correspond the value of a repo_name entry from one of the repositories that is configured via the PORTDIR or PORTDIR_OVERLAY variables. Since layout.conf is now used to control eclass inheritance, it is now safer to use overlays which contain forked eclasses have names identical to those from the main tree. Such eclasses will only apply to their containing repository and any other repositories which reference their containing repository via layout.conf. This solves bug #124041 by containing eclass overrides so that they don't necessarily apply to all ebuilds. Thanks to Alistair Bush <ali_bush@g.o> for his initial patch for layout.conf support in repoman (will be merged later). 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=13291
Diffstat (limited to 'pym/portage/cache/metadata.py')
-rw-r--r--pym/portage/cache/metadata.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/pym/portage/cache/metadata.py b/pym/portage/cache/metadata.py
index a8be01095..e3f6fc571 100644
--- a/pym/portage/cache/metadata.py
+++ b/pym/portage/cache/metadata.py
@@ -29,7 +29,7 @@ class database(flat_hash.database):
loc = location
super(database, self).__init__(location, *args, **config)
self.location = os.path.join(loc, "metadata","cache")
- self.ec = portage.eclass_cache.cache(loc)
+ self.ec = None
self.raise_stat_collision = False
def _parse_data(self, data, cpv):
@@ -53,9 +53,11 @@ class database(flat_hash.database):
if "_eclasses_" not in d:
if "INHERITED" in d:
+ if self.ec is None:
+ self.ec = portage.eclass_cache.cache(self.location)
try:
d["_eclasses_"] = self.ec.get_eclass_data(
- d["INHERITED"].split(), from_master_only=True)
+ d["INHERITED"].split())
except KeyError, e:
# INHERITED contains a non-existent eclass.
raise cache_errors.CacheCorruption(cpv, e)