diff options
author | dlehman <dlehman> | 2007-01-16 21:12:52 +0000 |
---|---|---|
committer | dlehman <dlehman> | 2007-01-16 21:12:52 +0000 |
commit | a819c9e6bd4b07bd4b17d6071eb42484e7e744fb (patch) | |
tree | 7c46f7793fbd325b3d4496d6cba3f1f6a1f23766 /yuminstall.py | |
parent | 8bda00c30726d98f58e392eb66be12b25a7368df (diff) | |
download | anaconda-a819c9e6bd4b07bd4b17d6071eb42484e7e744fb.tar.gz anaconda-a819c9e6bd4b07bd4b17d6071eb42484e7e744fb.tar.xz anaconda-a819c9e6bd4b07bd4b17d6071eb42484e7e744fb.zip |
* yuminstall.py (doPostSelection): remove packages added to solve
dependencies if we can't accept the package selection because of
limited disk space (#222894)
* yuminstall.py (_undoDepInstalls): new method to remove transaction
members that are only there because something depends on them
* yuminstall.py (doPostSelection): don't pop the depsolver progress
meter on ENOSPC since we'll do it in the finally block anyway (#215493)
Diffstat (limited to 'yuminstall.py')
-rw-r--r-- | yuminstall.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/yuminstall.py b/yuminstall.py index cc0a11293..7c030fb5f 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -377,6 +377,12 @@ class YumSorter(yum.YumBase): return best return None + def _undoDepInstalls(self): + # clean up after ourselves in the case of failures + for txmbr in self.tsInfo: + if txmbr.isDep: + self.tsInfo.remove(txmbr.pkgtup) + def prof_resolveDeps(self): fn = "anaconda.prof.0" import hotshot, hotshot.stats @@ -452,7 +458,7 @@ class YumSorter(yum.YumBase): found = True break if not found: - txmbr.setAsDep(member.po) + member.setAsDep(txmbr.po) return unresolved @@ -1114,7 +1120,6 @@ class YumBackend(AnacondaBackend): if largePart and \ largePart.getActualSize(anaconda.id.partitions, anaconda.id.diskset) < self.totalSize / 1024: - dscb.pop() rc = anaconda.intf.messageWindow(_("Error"), _("Your selected packages require %d MB " "of free space for installation, but " @@ -1127,6 +1132,7 @@ class YumBackend(AnacondaBackend): if rc == 1: sys.exit(1) else: + self.ayum._undoDepInstalls() return DISPATCH_BACK finally: dscb.pop() |