Add DEFINED_PHASES to the dbapi caches and _emerge.Package.metadata
authorSebastian Luther <SebastianLuther@gmx.de>
Tue, 30 Mar 2010 12:10:49 +0000 (14:10 +0200)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Mar 2010 12:17:05 +0000 (05:17 -0700)
pym/_emerge/Package.py
pym/portage/dbapi/bintree.py
pym/portage/dbapi/porttree.py
pym/portage/dbapi/vartree.py

index f94544127d3bff5e8cc649c9e9e8d1a1dc5cc7a3..bce4e6cbec50d5ef6f5abce900a707e3da444030 100644 (file)
@@ -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()
index 610813f76e92d0ecb490f5099b14a0552c17ad4a..997d629a875bb40405cacea52d76001db2ea2119 100644 (file)
@@ -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 = {
index 140a3bd80ecbc8bd84d242215d119b1e52e2e6d1..fd7dbe6b718a5dbe8b6a629a69a539566c2dca6e 100644 (file)
@@ -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()
index 38622df459b78eb981b1645fd9457f94919ed15c..e6e42b9f9b21fa4ed900f22d67b08ff6ffca5a58 100644 (file)
@@ -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")