This message can be ignored in kickstart by using %packages --ignoremissing. --- yuminstall.py | 57 ++++++++++++++++++++++++++++++++++++++++++--------------- 1 files changed, 42 insertions(+), 15 deletions(-) diff --git a/yuminstall.py b/yuminstall.py index 76c7f64..1712a15 100644 --- a/yuminstall.py +++ b/yuminstall.py @@ -1361,27 +1361,54 @@ reposdir=/etc/anaconda.repos.d,/tmp/updates/anaconda.repos.d,/tmp/product/anacon self.ayum.update() try: - while 1: + while True: try: (code, msgs) = self.ayum.buildTransaction() + + # If %packages --ignoremissing was given, don't bother + # prompting for missing dependencies. + if anaconda.isKickstart and anaconda.id.ksdata.packages.handleMissing == KS_MISSING_IGNORE: + break + + if code == 1 and not anaconda.id.upgrade: + # resolveDeps returns 0 if empty transaction, 1 if error, + # 2 if success + depprob = "\n".join(msgs) + + rc = anaconda.intf.detailedMessageWindow(_("Warning"), + _("Some of the packages you have selected for " + "install are missing dependencies. You can " + "exit the installation, go back and change " + "your package selections, or continue " + "installing these packages without their " + "dependencies."), + depprob + "\n", type="custom", custom_icon="error", + custom_buttons=[_("_Exit installer"), _("_Back"), + _("_Continue")]) + + if rc == 0: + sys.exit(1) + elif rc == 1: + self.ayum._undoDepInstalls() + return DISPATCH_BACK + + break except RepoError, e: - buttons = [_("_Exit installer"), _("_Retry")] + # FIXME: would be nice to be able to recover here + rc = anaconda.intf.messageWindow(_("Error"), + _("Unable to read package metadata. This may be " + "due to a missing repodata directory. Please " + "ensure that your install tree has been " + "correctly generated.\n\n%s" % e), + type="custom", custom_icon="error", + custom_buttons=[_("_Exit installer"), _("_Retry")]) + if rc == 0: + sys.exit(0) + else: + continue else: break - # FIXME: would be nice to be able to recover here - rc = anaconda.intf.messageWindow(_("Error"), - _("Unable to read package metadata. This may be " - "due to a missing repodata directory. Please " - "ensure that your install tree has been " - "correctly generated.\n\n%s" % e), - type="custom", custom_icon="error", - custom_buttons=buttons) - if rc == 0: - sys.exit(0) - else: - continue - (self.dlpkgs, self.totalSize, self.totalFiles) = self.ayum.getDownloadPkgs() if not anaconda.id.getUpgrade(): -- 1.6.5.1 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list