diff options
author | Matt Wilson <msw@redhat.com> | 2000-06-02 23:37:25 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-06-02 23:37:25 +0000 |
commit | 93d143385829ca1685e003dff08efa79b1c1dec1 (patch) | |
tree | 574e5191bef8ab83cf4d6d42be823736c7ed2218 | |
parent | b6b1bc416c3acfa5651d7821de77120627a465de (diff) | |
download | anaconda-93d143385829ca1685e003dff08efa79b1c1dec1.tar.gz anaconda-93d143385829ca1685e003dff08efa79b1c1dec1.tar.xz anaconda-93d143385829ca1685e003dff08efa79b1c1dec1.zip |
move to rebuild db before searching for packages - reduce time in db1 access
-rw-r--r-- | todo.py | 33 |
1 files changed, 16 insertions, 17 deletions
@@ -742,8 +742,23 @@ class ToDo: self.getCompsList () self.getHeaderList () - packages = rpm.findUpgradeSet (self.hdList.hdlist, self.instPath) + self.dbpath = "/var/lib/anaconda-rebuilddb" + str(int(time.time())) + rpm.addMacro("_dbpath_rebuild", self.dbpath); + # now, set the system clock so the timestamps will be right: + iutil.setClock (self.instPath) + + # and rebuild the database so we can run the dependency problem + # sets against the on disk db + rc = rpm.rebuilddb (self.instPath) + if rc: + self.intf.messageWindow(_("Error"), + _("Rebuild of RPM database failed. " + "You may be out of disk space?")) + raise RuntimeError, "Rebuild of RPM database failed." + + rpm.addMacro("_dbpath", self.dbpath); + packages = rpm.findUpgradeSet (self.hdList.hdlist, self.instPath) # unselect all packages for package in self.hdList.packages.values (): package.selected = 0 @@ -763,23 +778,7 @@ class ToDo: if package[rpm.RPMTAG_NAME] == "gmc": hasgmc = 1 - self.dbpath = "/var/lib/anaconda-rebuilddb" + str(int(time.time())) - rpm.addMacro("_dbpath_rebuild", self.dbpath); - - # now, set the system clock so the timestamps will be right: - iutil.setClock (self.instPath) - - # and rebuild the database so we can run the dependency problem - # sets against the on disk db - rc = rpm.rebuilddb (self.instPath) - if rc: - self.intf.messageWindow(_("Error"), - _("Rebuild of RPM database failed. " - "You may be out of disk space?")) - raise RuntimeError, "Rebuild of RPM database failed." - # open up the database to check dependencies - rpm.addMacro("_dbpath", self.dbpath); db = rpm.opendb (0, self.instPath) # if we have X but not gmc, we need to turn on GNOME. We only |