aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2015-03-23 00:21:24 -0700
committerBrian Dolbec <dolsen@gentoo.org>2015-04-03 17:47:00 -0700
commit42d5c45c477d251e40880d6fc9115b62d760e25e (patch)
tree3386cdf22093ec85fd42fef8fea42a1f75ea13c7
parentportage/package/ebuild/manifest.py: Remove deprecated manifest1_compat parameter (diff)
downloadportage-42d5c45c477d251e40880d6fc9115b62d760e25e.tar.gz
portage-42d5c45c477d251e40880d6fc9115b62d760e25e.tar.bz2
portage-42d5c45c477d251e40880d6fc9115b62d760e25e.zip
portage/package/ebuild/manifest.y: Add getManifest function
This replaces the original digestcheck() which only passed in a path, not a Manifest instance. This retrieves a Manifest instance from the repo_config instance for that repo. This standardizes the use of digestcheck to the new Manifest class function.
-rw-r--r--pym/portage/package/ebuild/manifest.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/pym/portage/package/ebuild/manifest.py b/pym/portage/package/ebuild/manifest.py
index 163f86f39..3353948b2 100644
--- a/pym/portage/package/ebuild/manifest.py
+++ b/pym/portage/package/ebuild/manifest.py
@@ -126,6 +126,17 @@ class Manifest2Entry(ManifestEntry):
return _unicode_encode(self.__unicode__(),
encoding=_encodings['repo.content'], errors='strict')
+def getManifest(mysettings):
+ """creates or retrieves a Manifest instance
+ @return: Manifest class instance
+ """
+
+ pkgdir = mysettings["O"]
+ repo_config = mysettings.repositories.get_repo_for_location(
+ os.path.dirname(os.path.dirname(pkgdir)))
+ mf = repo_config.load_manifest(pkgdir, mysettings["DISTDIR"])
+ return mf
+
class Manifest(object):
parsers = (parseManifest2,)
def __init__(self, pkgdir, distdir=None, fetchlist_dict=None,