summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-10-24 14:16:37 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-10-24 14:16:37 +0000
commitbd32e5cc5791bec81e5c54f659f532caaa464138 (patch)
tree282d2f98eab9391c49a63f1d521e5bde2c9fa442
parentae1d7a07f1f5371edf9abd6fe9550e68d4d8c8b6 (diff)
downloadbcfg2-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-xtools/create-debian-pkglist.py7
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 = []