diff options
author | Narayan Desai <desai@mcs.anl.gov> | 2010-01-20 01:43:10 +0000 |
---|---|---|
committer | Narayan Desai <desai@mcs.anl.gov> | 2010-01-20 01:43:10 +0000 |
commit | c65a902f85831425b3fdacbcbfb6059013a39f61 (patch) | |
tree | 6a4f91e56ef1f65a21acb50114b6f323edd5acca /src | |
parent | 94443a396b71c8f65e1d4d69d84c4f6a019538fe (diff) | |
download | bcfg2-c65a902f85831425b3fdacbcbfb6059013a39f61.tar.gz bcfg2-c65a902f85831425b3fdacbcbfb6059013a39f61.tar.bz2 bcfg2-c65a902f85831425b3fdacbcbfb6059013a39f61.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/Server/Plugins/Packages.py | 8 |
1 files changed, 4 insertions, 4 deletions
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': |