diff options
author | Matt Wilson <msw@redhat.com> | 2001-08-07 21:50:34 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-08-07 21:50:34 +0000 |
commit | d0fc1ca78fcdb988e762aa96bc697bfb384a3f23 (patch) | |
tree | 83ce4789032c0dc00c81c8319d1ed99983362fce | |
parent | 0fca08a66a570793b8f126fd35ef7ce7bdbbfe49 (diff) | |
download | anaconda-d0fc1ca78fcdb988e762aa96bc697bfb384a3f23.tar.gz anaconda-d0fc1ca78fcdb988e762aa96bc697bfb384a3f23.tar.xz anaconda-d0fc1ca78fcdb988e762aa96bc697bfb384a3f23.zip |
don't check for packages to upgrade when going backwards (#51149)
-rw-r--r-- | dispatch.py | 2 | ||||
-rw-r--r-- | upgrade.py | 11 |
2 files changed, 11 insertions, 2 deletions
diff --git a/dispatch.py b/dispatch.py index d45fb0e0f..c6544de61 100644 --- a/dispatch.py +++ b/dispatch.py @@ -92,7 +92,7 @@ installSteps = [ ("authentication", ("id.auth",)), ("readcomps", readPackages, ("intf", "method", "id")), ("findpackages", upgradeFindPackages, ("intf", "method", "id", - "instPath")), + "instPath", "dir")), ("package-selection", ("id.comps", "dispatch")), ("indivpackage", ("id.comps", "id.hdList")), ("handleX11pkgs", handleX11Packages, ("dir", "intf", "dispatch", diff --git a/upgrade.py b/upgrade.py index 45dfe67b3..4caf70df5 100644 --- a/upgrade.py +++ b/upgrade.py @@ -247,7 +247,9 @@ def upgradeMountFilesystems(intf, rootInfo, oldfsset, instPath): rebuildTime = None -def upgradeFindPackages (intf, method, id, instPath): +def upgradeFindPackages (intf, method, id, instPath, dir): + if dir == DISPATCH_BACK: + return global rebuildTime if not rebuildTime: rebuildTime = str(int(time.time())) @@ -257,6 +259,7 @@ def upgradeFindPackages (intf, method, id, instPath): _("Finding packages to upgrade...")) id.dbpath = "/var/lib/anaconda-rebuilddb" + rebuildTime + rpm.addMacro("_dbpath", "/var/lib/rpm") rpm.addMacro("_dbpath_rebuild", id.dbpath) rpm.addMacro("_dbapi", "-1") @@ -268,6 +271,12 @@ def upgradeFindPackages (intf, method, id, instPath): # sets against the on disk db rebuildpath = instPath + id.dbpath + + try: + iutil.rmrf (rebuildpath) + except: + pass + rc = rpm.rebuilddb (instPath) if rc: try: |