summaryrefslogtreecommitdiffstats
path: root/packages.py
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2003-02-05 22:21:33 +0000
committerJeremy Katz <katzj@redhat.com>2003-02-05 22:21:33 +0000
commit3fa72a8b50e233a1afdb714197a68c319e67d9fe (patch)
tree1e8e1f42ea39603496181035c475fa8bb9c6862d /packages.py
parent97bf42e57ae82a73e2874e4f033e689eb293c063 (diff)
downloadanaconda-3fa72a8b50e233a1afdb714197a68c319e67d9fe.tar.gz
anaconda-3fa72a8b50e233a1afdb714197a68c319e67d9fe.tar.xz
anaconda-3fa72a8b50e233a1afdb714197a68c319e67d9fe.zip
use new -r argument for convertdb1
do save and restore of the old rpmdb correctly for pre-rpm4 upgrades so that people might have a chance of not being completely hosed if the upgrade fails.
Diffstat (limited to 'packages.py')
-rw-r--r--packages.py21
1 files changed, 2 insertions, 19 deletions
diff --git a/packages.py b/packages.py
index 08299178e..6d1118693 100644
--- a/packages.py
+++ b/packages.py
@@ -1045,26 +1045,9 @@ def doPostInstall(method, id, intf, instPath):
w.set(4)
if upgrade and id.dbpath is not None:
- # move the rebuilt db into place.
+ # remove the old rpmdb
try:
- iutil.rmrf (instPath + "/var/lib/rpm.rpmsave")
- except OSError:
- pass
- 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")
-
- # XXX - rpm 4.0.2 %post braindeadness support
- try:
- os.unlink (instPath + "/etc/rpm/macros.db1")
+ iutil.rmrf (id.dbpath)
except OSError:
pass