diff options
author | Matt Wilson <msw@redhat.com> | 2001-08-10 03:51:59 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-08-10 03:51:59 +0000 |
commit | eb6c3f7eede41e64cb473ee2cf28b50ca6adc07c (patch) | |
tree | 4955840f5451bf50336e1439a80e3ed875850ba7 /packages.py | |
parent | f2eb794ccb9d036b65d79c8a2056e038e1360d27 (diff) | |
download | anaconda-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.py | 11 |
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") |