summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2001-08-10 03:51:59 +0000
committerMatt Wilson <msw@redhat.com>2001-08-10 03:51:59 +0000
commiteb6c3f7eede41e64cb473ee2cf28b50ca6adc07c (patch)
tree4955840f5451bf50336e1439a80e3ed875850ba7 /packages.py
parentf2eb794ccb9d036b65d79c8a2056e038e1360d27 (diff)
downloadanaconda-eb6c3f7eede41e64cb473ee2cf28b50ca6adc07c.tar.gz
anaconda-eb6c3f7eede41e64cb473ee2cf28b50ca6adc07c.tar.xz
anaconda-eb6c3f7eede41e64cb473ee2cf28b50ca6adc07c.zip
add a ditch-out workaround for #50339
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/packages.py b/packages.py
index cf733d9f0..55a10aabf 100644
--- a/packages.py
+++ b/packages.py
@@ -734,8 +734,15 @@ def doPostInstall(method, id, intf, instPath):
iutil.rmrf (instPath + "/var/lib/rpm.rpmsave")
except OSError:
pass
- os.rename (instPath + "/var/lib/rpm",
- instPath + "/var/lib/rpm.rpmsave")
+ try:
+ os.rename (instPath + "/var/lib/rpm",
+ instPath + "/var/lib/rpm.rpmsave")
+ except OSError:
+ # XXX hack..., if the above move failed, we'll just stash it in
+ # a (hopefully) unique location. (#50339)
+ os.rename (instPath + "/var/lib/rpm",
+ instPath + "/var/lib/rpm.rpmsave-%s", %
+ (str(int(time.time())),))
os.rename (instPath + id.dbpath,
instPath + "/var/lib/rpm")