summaryrefslogtreecommitdiffstats
path: root/todo.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-06-05 23:35:30 +0000
committerMatt Wilson <msw@redhat.com>2000-06-05 23:35:30 +0000
commit3b90ab8ee11c4521cd915b8913dc6e08923671d1 (patch)
tree1327beea6549611b45fd004f50d2fb6deec719ac /todo.py
parent1ce726abfc951c5c5c5a7da4d500b84f2f18e19d (diff)
downloadanaconda-3b90ab8ee11c4521cd915b8913dc6e08923671d1.tar.gz
anaconda-3b90ab8ee11c4521cd915b8913dc6e08923671d1.tar.xz
anaconda-3b90ab8ee11c4521cd915b8913dc6e08923671d1.zip
hack for upgrades
Diffstat (limited to 'todo.py')
-rw-r--r--todo.py34
1 files changed, 24 insertions, 10 deletions
diff --git a/todo.py b/todo.py
index c151c98f3..f9e4dd882 100644
--- a/todo.py
+++ b/todo.py
@@ -757,7 +757,21 @@ class ToDo:
"You may be out of disk space?"))
raise RuntimeError, "Rebuild of RPM database failed."
- rpm.addMacro("_dbpath", self.dbpath);
+### XXXXXXXXXXXXXXXXXXXXXXXXXXX fix me - move the replace back down to
+# doInstall
+# rpm.addMacro("_dbpath", self.dbpath);
+
+ # move the rebuilt db into place.
+ os.rename (self.instPath + "/var/lib/rpm",
+ self.instPath + "/var/lib/anaconda-oldrpm" + str(int(time.time())))
+ os.rename (self.instPath + self.dbpath,
+ self.instPath + "/var/lib/rpm")
+ rpm.addMacro ("_dbpath", "%{_var}/lib/rpm")
+# iutil.rmrf (self.instPath + "/var/lib/rpm-old")
+
+ # flag this so we only do it once.
+ self.dbpath = None
+
packages = rpm.findUpgradeSet (self.hdList.hdlist, self.instPath)
# unselect all packages
for package in self.hdList.packages.values ():
@@ -1151,16 +1165,16 @@ class ToDo:
self.fstab.mountFilesystems (self.instPath)
- if self.upgrade and self.dbpath:
+# if self.upgrade and self.dbpath:
# move the rebuilt db into place.
- os.rename (self.instPath + "/var/lib/rpm",
- self.instPath + "/var/lib/rpm-old")
- os.rename (self.instPath + self.dbpath,
- self.instPath + "/var/lib/rpm")
- rpm.addMacro ("_dbpath", "%{_var}/lib/rpm")
- iutil.rmrf (self.instPath + "/var/lib/rpm-old")
- # flag this so we only do it once.
- self.dbpath = None
+# os.rename (self.instPath + "/var/lib/rpm",
+# self.instPath + "/var/lib/rpm-old")
+# os.rename (self.instPath + self.dbpath,
+# self.instPath + "/var/lib/rpm")
+# rpm.addMacro ("_dbpath", "%{_var}/lib/rpm")
+# iutil.rmrf (self.instPath + "/var/lib/rpm-old")
+# # flag this so we only do it once.
+# self.dbpath = None
self.method.systemMounted (self.fstab, self.instPath)