[PATCH 2/2] Revert "Hook up the "Remove Packages" button on the dep solving error screen." (#905899).

Chris Lumens clumens at redhat.com
Wed Feb 27 15:15:56 UTC 2013


This reverts commit f4ec3d682ffd93dfc7105eaa09acdd7fd672a3e8.

This patch also removes the button entirely.  All I've ever seen it do is reduce
the installable package set to something like 30 packages and result in really
cryptic bugs about commands that should be there failing to run.  It doesn't
seem to help in just removing the one or two packages that have a problem,
since it looks like it's frequently a core package with the problem.
---
 pyanaconda/packaging/__init__.py     |  4 ----
 pyanaconda/packaging/yumpayload.py   |  5 -----
 pyanaconda/ui/gui/spokes/software.py | 31 ++++++++++++-------------------
 3 files changed, 12 insertions(+), 28 deletions(-)

diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index e25ebab..cba0f79 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -600,10 +600,6 @@ class ArchivePayload(ImagePayload):
     pass
 
 class PackagePayload(Payload):
-    def __init__(self, *args, **kwargs):
-        Payload.__init__(self, *args, **kwargs)
-        self.skipBroken = False
-
     """ A PackagePayload installs a set of packages onto the target system. """
     @property
     def kernelPackages(self):
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index 1f10176..30c5a5b 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -1219,11 +1219,6 @@ reposdir=%s
         log.info("checking software selection")
         self.txID = time.time()
 
-        if self.skipBroken:
-            log.info("running software check with skip_broken = True")
-            with _yum_lock:
-                self._yum.conf.skip_broken = True
-
         self.release()
         self.deleteYumTS()
 
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index cec0384..77b7d19 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -35,8 +35,6 @@ from .source import AdditionalReposDialog
 
 from pykickstart.parser import Group
 
-from gi.repository import GLib
-
 import sys
 
 __all__ = ["SoftwareSelectionSpoke"]
@@ -64,7 +62,6 @@ class SoftwareSelectionSpoke(NormalSpoke):
         self._addRepoDialog = AdditionalReposDialog(self.data)
 
         # Used for detecting whether anything's changed in the spoke.
-        self._clickedRemove = False
         self._origAddons = []
         self._origEnvironment = None
 
@@ -77,7 +74,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
 
         # Don't redo dep solving if nothing's changed.
         if row[2] == self._origEnvironment and set(addons) == set(self._origAddons) and \
-           not self._clickedRemove and self.txid_valid:
+           self.txid_valid:
             return
 
         self._selectFlag = False
@@ -88,7 +85,6 @@ class SoftwareSelectionSpoke(NormalSpoke):
             self.payload.selectGroup(group)
 
         # And then save these values so we can check next time.
-        self._clickedRemove = False
         self._origAddons = addons
         self._origEnvironment = self.environment
 
@@ -121,6 +117,8 @@ class SoftwareSelectionSpoke(NormalSpoke):
 
     @property
     def completed(self):
+        from pyanaconda.threads import threadMgr
+
         processingDone = not threadMgr.get("AnaCheckSoftwareThread") and \
                          not self._errorMsgs and self.txid_valid
 
@@ -139,6 +137,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
         # wait until the installation source spoke is completed.  This could be
         # because the user filled something out, or because we're done fetching
         # repo metadata from the mirror list, or we detected a DVD/CD.
+        from pyanaconda.threads import threadMgr
         return (not threadMgr.get("AnaSoftwareWatcher") and
                 not threadMgr.get("AnaPayloadMDThread") and
                 not threadMgr.get("AnaCheckSoftwareThread") and
@@ -150,6 +149,8 @@ class SoftwareSelectionSpoke(NormalSpoke):
 
     @property
     def status(self):
+        from pyanaconda.threads import threadMgr
+
         if self._errorMsgs:
             return _("Error checking software selection")
 
@@ -172,10 +173,14 @@ class SoftwareSelectionSpoke(NormalSpoke):
         return self.payload.environmentDescription(row[2])[0]
 
     def initialize(self):
+        from pyanaconda.threads import threadMgr, AnacondaThread
+
         NormalSpoke.initialize(self)
         threadMgr.add(AnacondaThread(name="AnaSoftwareWatcher", target=self._initialize))
 
     def _initialize(self):
+        from pyanaconda.threads import threadMgr
+
         communication.send_message(self.__class__.__name__, _("Downloading package metadata..."))
 
         threadMgr.wait("AnaPayloadThread")
@@ -215,6 +220,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
             return False
 
     def refresh(self):
+        from pyanaconda.threads import threadMgr
         NormalSpoke.refresh(self)
 
         threadMgr.wait("AnaPayloadMDThread")
@@ -325,10 +331,8 @@ class SoftwareSelectionSpoke(NormalSpoke):
 
         label = _("The following software marked for installation has errors.  "
                   "This is likely caused by an error with\nyour installation source.  "
-                  "You can attempt to remove these packages from your installation.\n"
-                  "change your installation source, or quit the installer.")
+                  "You can change your installation source or quit the installer.")
         dialog = DetailedErrorDialog(self.data, buttons=[_("_Quit"), _("_Cancel"),
-                                                         _("_Remove Packages"),
                                                          _("_Modify Software Source")],
                                                 label=label)
         with enlightbox(self.window, dialog.window):
@@ -344,17 +348,6 @@ class SoftwareSelectionSpoke(NormalSpoke):
             # Close the dialog so the user can change selections.
             pass
         elif rc == 2:
-            # This setting is just so we know to try re-resolving dependencies
-            # even if the user didn't change any other settings.
-            self._clickedRemove = True
-
-            # Attempt to remove the affected packages.  For yum payloads, we
-            # do this by just attempting to re-resolve dependencies with
-            # skip_broken set.
-            self._errorMsgs = None
-            self.payload.skipBroken = True
-            self.window.emit("button-clicked")
-        elif rc == 3:
             # Send the user to the installation source spoke.
             self.skipTo = "SourceSpoke"
             self.window.emit("button-clicked")
-- 
1.8.1.2



More information about the anaconda-patches mailing list