aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2019-01-01 14:15:14 -0600
committerTim Harder <radhermit@gmail.com>2019-01-01 14:21:44 -0600
commit46b66efd70fa3ac1382c7df0d77dd627f9f9af61 (patch)
treed3b34fe136b06c6171d179d22da7a748a26f969a /src/pkgcheck/checks/unstable_only.py
parentdoc/man: fix typo so subcommands are included in man page (diff)
downloadpkgcheck-46b66efd70fa3ac1382c7df0d77dd627f9f9af61.tar.gz
pkgcheck-46b66efd70fa3ac1382c7df0d77dd627f9f9af61.tar.bz2
pkgcheck-46b66efd70fa3ac1382c7df0d77dd627f9f9af61.zip
addons.StableCheckAddon: avoid overriding default arches
So checks using it don't get the stable arches list instead.
Diffstat (limited to 'src/pkgcheck/checks/unstable_only.py')
-rw-r--r--src/pkgcheck/checks/unstable_only.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/pkgcheck/checks/unstable_only.py b/src/pkgcheck/checks/unstable_only.py
index 7f009a88..fa4a0e34 100644
--- a/src/pkgcheck/checks/unstable_only.py
+++ b/src/pkgcheck/checks/unstable_only.py
@@ -3,16 +3,15 @@ from collections import defaultdict
from pkgcore.restrictions import packages, values
from snakeoil.strings import pluralism as _pl
-from ..addons import ArchesAddon, StableCheckAddon
-from ..base import package_feed, Warning
+from .. import addons, base
-class UnstableOnly(Warning):
+class UnstableOnly(base.Warning):
"""Package/keywords that are strictly unstable."""
__slots__ = ("category", "package", "versions", "arches")
- threshold = package_feed
+ threshold = base.package_feed
def __init__(self, pkgs, arches):
super().__init__()
@@ -26,16 +25,16 @@ class UnstableOnly(Warning):
_pl(self.arches, plural='es'), ', '.join(self.arches), ', '.join(self.versions))
-class UnstableOnlyReport(StableCheckAddon):
+class UnstableOnlyReport(base.Template):
"""Scan for packages that have just unstable keywords."""
- feed_type = package_feed
- required_addons = (ArchesAddon,)
+ feed_type = base.package_feed
+ required_addons = (addons.StableCheckAddon,)
known_results = (UnstableOnly,)
def __init__(self, options, arches):
super().__init__(options, arches)
- arches = set(x.strip().lstrip("~") for x in options.arches)
+ arches = set(x.strip().lstrip("~") for x in options.stable_arches)
# stable, then unstable, then file
self.arch_restricts = {}