summaryrefslogtreecommitdiffstats
path: root/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
diff options
context:
space:
mode:
authorChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-20 11:51:04 -0400
committerChris St. Pierre <chris.a.st.pierre@gmail.com>2012-09-20 11:51:04 -0400
commit46464991f12df8b9823ef913d18e0072c740ebbb (patch)
treee88ab301d304c3f493a454945037d53836fe2922 /src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
parentc5409b7cb6301b4ee8cf498328dbe8e04d234ca9 (diff)
downloadbcfg2-46464991f12df8b9823ef913d18e0072c740ebbb.tar.gz
bcfg2-46464991f12df8b9823ef913d18e0072c740ebbb.tar.bz2
bcfg2-46464991f12df8b9823ef913d18e0072c740ebbb.zip
Packages: fixed unknown_filter
Diffstat (limited to 'src/lib/Bcfg2/Server/Plugins/Packages/Yum.py')
-rw-r--r--src/lib/Bcfg2/Server/Plugins/Packages/Yum.py27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
index 474bddc49..9b915048d 100644
--- a/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
+++ b/src/lib/Bcfg2/Server/Plugins/Packages/Yum.py
@@ -778,16 +778,6 @@ class YumSource(Source):
#: YumSource sets the ``type`` on Package entries to "yum"
ptype = 'yum'
- #: By default,
- #: :class:`Bcfg2.Server.Plugins.Packages.Source.Source` filters
- #: out unknown packages that start with "choice", but that doesn't
- #: mean anything to Yum or RPM. Instead, we filter out unknown
- #: packages that start with "rpmlib", although this is likely
- #: legacy behavior; that would seem to indicate that a package
- #: required some RPM feature that isn't provided, which is a bad
- #: thing. This should probably go away at some point.
- unknown_filter = lambda u: u.startswith("rpmlib")
-
def __init__(self, basepath, xsource, setup):
Source.__init__(self, basepath, xsource, setup)
self.pulp_id = None
@@ -1022,6 +1012,23 @@ class YumSource(Source):
return rv
get_vpkgs.__doc__ = Source.get_vpkgs.__doc__
+ def unknown_filter(self, package):
+ """ By default,
+ :class:`Bcfg2.Server.Plugins.Packages.Source.Source` filters
+ out unknown packages that start with "choice", but that
+ doesn't mean anything to Yum or RPM. Instead, we filter out
+ unknown packages that start with "rpmlib", although this is
+ likely legacy behavior; that would seem to indicate that a
+ package required some RPM feature that isn't provided, which
+ is a bad thing. This should probably go away at some point.
+
+ :param package: The name of a package that was unknown to the
+ backend
+ :type package: string
+ :returns: bool
+ """
+ return package.startswith("rpmlib")
+
def filter_unknown(self, unknown):
if self.use_yum:
filtered = set()