summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Luther <SebastianLuther@gmx.de>2010-03-30 14:10:49 +0200
committerZac Medico <zmedico@gentoo.org>2010-03-30 05:17:05 -0700
commit59d910bceb96d1c68687f3a10dbb5147063e6b02 (patch)
treec9132b41a87867def26e0a04426e798d301fe22e
parent992e38d75016834fd89e5a05b3a407234e63e5b3 (diff)
downloadportage-59d910bceb96d1c68687f3a10dbb5147063e6b02.tar.gz
portage-59d910bceb96d1c68687f3a10dbb5147063e6b02.tar.bz2
portage-59d910bceb96d1c68687f3a10dbb5147063e6b02.zip
Add DEFINED_PHASES to the dbapi caches and _emerge.Package.metadata
-rw-r--r--pym/_emerge/Package.py7
-rw-r--r--pym/portage/dbapi/bintree.py7
-rw-r--r--pym/portage/dbapi/porttree.py2
-rw-r--r--pym/portage/dbapi/vartree.py2
4 files changed, 12 insertions, 6 deletions
diff --git a/pym/_emerge/Package.py b/pym/_emerge/Package.py
index f94544127..bce4e6cbe 100644
--- a/pym/_emerge/Package.py
+++ b/pym/_emerge/Package.py
@@ -29,7 +29,8 @@ class Package(Task):
"BUILD_TIME", "CHOST", "COUNTER", "DEPEND", "EAPI",
"INHERITED", "IUSE", "KEYWORDS",
"LICENSE", "PDEPEND", "PROVIDE", "RDEPEND",
- "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE", "_mtime_"]
+ "repository", "PROPERTIES", "RESTRICT", "SLOT", "USE",
+ "_mtime_", "DEFINED_PHASES"]
def __init__(self, **kwargs):
Task.__init__(self, **kwargs)
@@ -333,3 +334,7 @@ class _PackageMetadataWrapper(_PackageMetadataWrapperBase):
@property
def restrict(self):
return self['RESTRICT'].split()
+
+ @property
+ def defined_phases(self):
+ return self['DEFINED_PHASES'].split()
diff --git a/pym/portage/dbapi/bintree.py b/pym/portage/dbapi/bintree.py
index 610813f76..997d629a8 100644
--- a/pym/portage/dbapi/bintree.py
+++ b/pym/portage/dbapi/bintree.py
@@ -53,7 +53,7 @@ class bindbapi(fakedbapi):
self._aux_cache_keys = set(
["BUILD_TIME", "CHOST", "DEPEND", "EAPI", "IUSE", "KEYWORDS",
"LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE",
- "RDEPEND", "repository", "RESTRICT", "SLOT", "USE"])
+ "RDEPEND", "repository", "RESTRICT", "SLOT", "USE", "DEFINED_PHASES"])
self._aux_cache_slot_dict = slot_dict_class(self._aux_cache_keys)
self._aux_cache = {}
@@ -188,7 +188,7 @@ class binarytree(object):
self._pkgindex_aux_keys = \
["BUILD_TIME", "CHOST", "DEPEND", "DESCRIPTION", "EAPI",
"IUSE", "KEYWORDS", "LICENSE", "PDEPEND", "PROPERTIES",
- "PROVIDE", "RDEPEND", "repository", "SLOT", "USE"]
+ "PROVIDE", "RDEPEND", "repository", "SLOT", "USE", "DEFINED_PHASES"]
self._pkgindex_aux_keys = list(self._pkgindex_aux_keys)
self._pkgindex_use_evaluated_keys = \
("LICENSE", "RDEPEND", "DEPEND",
@@ -212,7 +212,8 @@ class binarytree(object):
"RDEPEND" : "",
"RESTRICT": "",
"SLOT" : "0",
- "USE" : ""
+ "USE" : "",
+ "DEFINED_PHASES" : ""
}
self._pkgindex_inherited_keys = ["CHOST", "repository"]
self._pkgindex_default_header_data = {
diff --git a/pym/portage/dbapi/porttree.py b/pym/portage/dbapi/porttree.py
index 140a3bd80..fd7dbe6b7 100644
--- a/pym/portage/dbapi/porttree.py
+++ b/pym/portage/dbapi/porttree.py
@@ -402,7 +402,7 @@ class portdbapi(dbapi):
self._aux_cache_keys = set(
["DEPEND", "EAPI", "INHERITED", "IUSE", "KEYWORDS", "LICENSE",
"PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND", "repository",
- "RESTRICT", "SLOT"])
+ "RESTRICT", "SLOT", "DEFINED_PHASES"])
self._aux_cache = {}
self._broken_ebuilds = set()
diff --git a/pym/portage/dbapi/vartree.py b/pym/portage/dbapi/vartree.py
index 38622df45..e6e42b9f9 100644
--- a/pym/portage/dbapi/vartree.py
+++ b/pym/portage/dbapi/vartree.py
@@ -848,7 +848,7 @@ class vardbapi(dbapi):
["BUILD_TIME", "CHOST", "COUNTER", "DEPEND", "DESCRIPTION",
"EAPI", "HOMEPAGE", "IUSE", "KEYWORDS",
"LICENSE", "PDEPEND", "PROPERTIES", "PROVIDE", "RDEPEND",
- "repository", "RESTRICT" , "SLOT", "USE"])
+ "repository", "RESTRICT" , "SLOT", "USE", "DEFINED_PHASES"])
self._aux_cache_obj = None
self._aux_cache_filename = os.path.join(self.root,
CACHE_PATH, "vdb_metadata.pickle")