summaryrefslogtreecommitdiffstats
path: root/src/lib/Client/Tools/YUMng.py
diff options
context:
space:
mode:
authorNarayan Desai <desai@mcs.anl.gov>2009-04-06 15:24:29 +0000
committerNarayan Desai <desai@mcs.anl.gov>2009-04-06 15:24:29 +0000
commit80b7f00b3c64bc59eb9be530486dd153ea5f8db7 (patch)
treee1c26ec43138f5d2627c57850ac255fdb2904053 /src/lib/Client/Tools/YUMng.py
parent26da41e9b1bef3596e812116df6bc18fe3d7c859 (diff)
downloadbcfg2-80b7f00b3c64bc59eb9be530486dd153ea5f8db7.tar.gz
bcfg2-80b7f00b3c64bc59eb9be530486dd153ea5f8db7.tar.bz2
bcfg2-80b7f00b3c64bc59eb9be530486dd153ea5f8db7.zip
YUMng: Fix version=auto for epoch-sensitive packages
git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5151 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/lib/Client/Tools/YUMng.py')
-rw-r--r--src/lib/Client/Tools/YUMng.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/Client/Tools/YUMng.py b/src/lib/Client/Tools/YUMng.py
index 0ebf35313..71d2bf071 100644
--- a/src/lib/Client/Tools/YUMng.py
+++ b/src/lib/Client/Tools/YUMng.py
@@ -62,7 +62,7 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng):
for dest, source in [(self.yum_avail, yup.updates),
(self.yum_installed, self.yb.rpmdb)]:
for pkg in source:
- data = [(pkg.arch, '-'.join((pkg.version, pkg.release)))]
+ data = [(pkg.arch, (pkg.epoch, pkg.version, pkg.release))]
if pkg.name in dest:
dest[pkg.name].update(data)
else:
@@ -81,12 +81,11 @@ class YUMng(Bcfg2.Client.Tools.RPMng.RPMng):
if entry.get('name') in self.yum_avail:
# installed but out of date
data.update(self.yum_avail[entry.get('name')])
- for (arch, vdata) in data.iteritems():
- vers, rel = vdata.split('-')
+ for (arch, (epoch, vers, rel)) in data.iteritems():
Bcfg2.Client.XML.SubElement(entry, "Instance",
name=entry.get('name'),
version=vers, arch=arch,
- release=rel)
+ release=rel, epoch=epoch)
return Bcfg2.Client.Tools.RPMng.RPMng.VerifyPackage(self, entry,
modlist)