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 /upgrade.py | |
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)
Diffstat (limited to 'upgrade.py')
-rw-r--r-- | upgrade.py | 11 |
1 files changed, 10 insertions, 1 deletions
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: |