diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2009-10-24 14:16:37 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2009-10-24 14:16:37 +0000 |
commit | bd32e5cc5791bec81e5c54f659f532caaa464138 (patch) | |
tree | 282d2f98eab9391c49a63f1d521e5bde2c9fa442 | |
parent | ae1d7a07f1f5371edf9abd6fe9550e68d4d8c8b6 (diff) | |
download | bcfg2-bd32e5cc5791bec81e5c54f659f532caaa464138.tar.gz bcfg2-bd32e5cc5791bec81e5c54f659f532caaa464138.tar.bz2 bcfg2-bd32e5cc5791bec81e5c54f659f532caaa464138.zip |
create-debian-pkglist: support regex based filename matching (Patch from Leif)
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5493 ce84e21b-d406-0410-9b95-82705330c041
-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 = [] |