From c65a902f85831425b3fdacbcbfb6059013a39f61 Mon Sep 17 00:00:00 2001 From: Narayan Desai Date: Wed, 20 Jan 2010 01:43:10 +0000 Subject: Packages: process apt-source choices correctly with multi-package version requirements (Reported by gregcoit) [bugfix] git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5687 ce84e21b-d406-0410-9b95-82705330c041 --- src/lib/Server/Plugins/Packages.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/Server') diff --git a/src/lib/Server/Plugins/Packages.py b/src/lib/Server/Plugins/Packages.py index 510feeff4..d24b875db 100644 --- a/src/lib/Server/Plugins/Packages.py +++ b/src/lib/Server/Plugins/Packages.py @@ -426,14 +426,14 @@ class APTSource(Source): bdeps[barch][pkgname] = [] vindex = 0 for dep in words[1].split(','): - raw_dep = re.sub('\(.*\)', '', dep) - if '|' in raw_dep: + if '|' in dep: + cdeps = [re.sub('\(.*\)', '', cdep) for cdep in dep.split('|')] dyn_dname = "choice-%s-%s-%s" % (pkgname, barch, vindex) vindex += 1 bdeps[barch][pkgname].append(dyn_dname) - dyn_list = [x.strip() for x in raw_dep.split('|')] - bprov[barch][dyn_dname] = set(dyn_list) + bprov[barch][dyn_dname] = set(cdeps) else: + raw_dep = re.sub('\(.*\)', '', dep) raw_dep = raw_dep.rstrip().strip() bdeps[barch][pkgname].append(raw_dep) elif words[0] == 'Provides': -- cgit v1.2.3-1-g7c22