From fbbd7f65a1e6da56b0a1da12be59a1887e310a42 Mon Sep 17 00:00:00 2001 From: Daniel Joseph Barnhart Clark Date: Thu, 19 Jul 2007 02:10:32 +0000 Subject: Change encap splitting regular expressions to allow package names with dashes and version names with pluses. Should solve ticket #467 (except for the not complaining about epkg.log thing, but that seems harmless). http://kodos.sourceforge.net/ is your friend. git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@3482 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Pkgmgr.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/lib/Server/Plugins/Pkgmgr.py') diff --git a/src/lib/Server/Plugins/Pkgmgr.py b/src/lib/Server/Plugins/Pkgmgr.py index e212e0c95..9dc05352d 100644 --- a/src/lib/Server/Plugins/Pkgmgr.py +++ b/src/lib/Server/Plugins/Pkgmgr.py @@ -9,9 +9,9 @@ class PNode(Bcfg2.Server.Plugin.INode): '''PNode has a list of packages available at a particular group intersection''' splitters = {'rpm':re.compile('^(.*/)?(?P[\w\+\d\.]+(-[\w\+\d\.]+)*)-' + \ '(?P[\w\d\.]+-([\w\d\.]+))\.(?P\S+)\.rpm$'), - 'encap':re.compile('^(?P\w+)-(?P[\w\d\.-]+).encap.*$')} + 'encap':re.compile('^(?P[\w-]+)-(?P[\w\d\.+-]+).encap.*$')} ignore = ['Package'] - + def __init__(self, data, pdict, parent=None): # copy local attributes to all child nodes if no local attribute exists if not pdict.has_key('Package'): @@ -68,7 +68,7 @@ class PNode(Bcfg2.Server.Plugin.INode): self.contents['Package'][pkgname]['__children__'] = pkg.getchildren() else: self.contents['Package'][pkg.get('name')].update(pkg.attrib) - + class PkgSrc(Bcfg2.Server.Plugin.XMLSrc): '''PkgSrc files contain a PNode hierarchy that returns matching package entries''' -- cgit v1.2.3-1-g7c22