diff options
-rwxr-xr-x | tools/create-debian-pkglist.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/create-debian-pkglist.py b/tools/create-debian-pkglist.py index 822e4922c..450c6aba6 100755 --- a/tools/create-debian-pkglist.py +++ b/tools/create-debian-pkglist.py @@ -50,6 +50,10 @@ class Source: self.filename = "%s/Pkgmgr/%s.xml" % (bcfg2_repos_prefix, section) self.groups = get_as_list(confparser.get(section, "group_names")) self.priority = confparser.getint(section, "priority") + try: + self.pattern = confparser.get(section, "pattern", raw=True) + except: + self.pattern = '.*' self.architectures = get_as_list(confparser.get(section, "architectures")) self.arch_specialurl = set() @@ -143,7 +147,8 @@ Source URLS: %s""" % (self.filename, self.groups, self.priority, self.architectu continue except: raise Exception("Could not process URL %s\n%s\nPlease verify the URL." % (url, sys.exc_value)) - return pkgdata + return dict((k,v) for (k,v) in pkgdata.items() \ + if re.search(self.pattern, k)) def _get_sorted_pkg_keys(self, pkgdata): pkgs = [] |