aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2011-08-05 17:42:27 +0200
committerMichał Górny <mgorny@gentoo.org>2011-08-05 17:42:27 +0200
commite471c2514859d9d630d831267b5f68f99d74c75c (patch)
tree0603636f1f354bc8df069c3e0debc2a2c86bef80 /pmstestsuite
parentSupport use multiple --package-manager and --pm-options args. (diff)
downloadpms-test-suite-e471c2514859d9d630d831267b5f68f99d74c75c.tar.gz
pms-test-suite-e471c2514859d9d630d831267b5f68f99d74c75c.tar.bz2
pms-test-suite-e471c2514859d9d630d831267b5f68f99d74c75c.zip
Store whether PM requires Manifests.
Diffstat (limited to 'pmstestsuite')
-rw-r--r--pmstestsuite/pm/__init__.py9
-rw-r--r--pmstestsuite/pm/paludispm.py1
-rw-r--r--pmstestsuite/pm/pkgcorepm.py3
-rw-r--r--pmstestsuite/pm/portagepm.py1
4 files changed, 13 insertions, 1 deletions
diff --git a/pmstestsuite/pm/__init__.py b/pmstestsuite/pm/__init__.py
index e268f7f..4da1fba 100644
--- a/pmstestsuite/pm/__init__.py
+++ b/pmstestsuite/pm/__init__.py
@@ -41,6 +41,15 @@ class PackageManager(ABCObject):
"""
pass
+ @abstractproperty
+ def requires_manifests(self):
+ """
+ Whether the PM requires Manifests.
+
+ @type: bool
+ """
+ pass
+
@classmethod
def is_available(cls):
"""
diff --git a/pmstestsuite/pm/paludispm.py b/pmstestsuite/pm/paludispm.py
index be7cc84..df1a686 100644
--- a/pmstestsuite/pm/paludispm.py
+++ b/pmstestsuite/pm/paludispm.py
@@ -23,6 +23,7 @@ class PaludisPM(_PaludisPM, PackageManager):
cave_path = '/usr/bin/cave'
common_cave_opts = ['--lazy', '--preserve-world', '--execute']
+ requires_manifests = True
def _spawn_cave(self, cpvs, action, opts = []):
return subprocess.Popen(['cave', '--log-level', 'warning', action]
diff --git a/pmstestsuite/pm/pkgcorepm.py b/pmstestsuite/pm/pkgcorepm.py
index 875ecf6..b430b2d 100644
--- a/pmstestsuite/pm/pkgcorepm.py
+++ b/pmstestsuite/pm/pkgcorepm.py
@@ -20,6 +20,7 @@ class PkgCorePM(_PkgCorePM, PackageManager):
name = 'pkgcore'
common_pmerge_opts = ['--oneshot']
+ requires_manifests = False
@property
def package_limit(self):
@@ -51,4 +52,4 @@ class PkgCorePM(_PkgCorePM, PackageManager):
# pkgcore can't do Manifests
def remanifest(self, *args):
- pass
+ raise NotImplementedError()
diff --git a/pmstestsuite/pm/portagepm.py b/pmstestsuite/pm/portagepm.py
index a33f24e..b5479b8 100644
--- a/pmstestsuite/pm/portagepm.py
+++ b/pmstestsuite/pm/portagepm.py
@@ -18,6 +18,7 @@ class PortagePM(_PortagePM, PackageManager):
name = 'portage'
common_emerge_opts = ['--ask', 'n', '--keep-going', '--oneshot']
+ requires_manifests = False
repo_paths = []