summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-07-24 23:35:33 +0000
committerMatt Wilson <msw@redhat.com>2000-07-24 23:35:33 +0000
commit0a962594d711bcbf83c0835af8787cadb3010039 (patch)
treec88462ec58f02b0dd30e38b274af97fe2bae9b84
parentca8e2baa80442775c9bd908773c0b8874e4a7ada (diff)
downloadanaconda-0a962594d711bcbf83c0835af8787cadb3010039.tar.gz
anaconda-0a962594d711bcbf83c0835af8787cadb3010039.tar.xz
anaconda-0a962594d711bcbf83c0835af8787cadb3010039.zip
fixed upgrade rpm database removal
-rw-r--r--todo.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/todo.py b/todo.py
index f4a82e077..f5af44227 100644
--- a/todo.py
+++ b/todo.py
@@ -1423,11 +1423,15 @@ class ToDo:
if self.upgrade and self.dbpath:
# move the rebuilt db into place.
- iutil.rmrf (self.instPath + "/var/lib/rpm.rpmsave")
+ try:
+ iutil.rmrf (self.instPath + "/var/lib/rpm-old")
+ except OSError:
+ pass
os.rename (self.instPath + "/var/lib/rpm",
- self.instPath + "/var/lib/rpm.rpmsave")
+ self.instPath + "/var/lib/rpm-old")
os.rename (self.instPath + self.dbpath,
self.instPath + "/var/lib/rpm")
+ iutil.rmrf (self.instPath + "/var/lib/rpm-old")
rpm.addMacro ("_dbpath", "%{_var}/lib/rpm")
rpm.addMacro ("_dbapi", "3")
# flag this so we only do it once.
@@ -1505,7 +1509,10 @@ class ToDo:
problems = ts.run(0, ~rpm.RPMPROB_FILTER_DISKSPACE,
self.instCallback, p)
-
+
+# problems = ts.run(rpm.RPMTRANS_FLAG_TEST, ~0,
+# self.instCallback, p)
+
if problems:
needed = {}
size = 12