neil / rpms / anaconda

Forked from rpms/anaconda a year ago
Clone
Blob Blame History Raw
From 81bc3c3495c5ada22ac43aac5773888dda27c7b6 Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Fri, 4 Apr 2014 23:49:51 +0000
Subject: [PATCH 01/20] gui/spokes/software: Enable iff payload is
 PackagePayload

This should be the equivalent of the livecd test.

Resolves: rhbz#1113535
Port of rpmostreepayload patches from master
commit 63e5d9cb577428519d61a279c3b53442877f9c51
---
 pyanaconda/ui/gui/spokes/software.py | 4 ++--
 pyanaconda/ui/gui/spokes/source.py   | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index b21866b..fe711b5 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -24,7 +24,7 @@ from gi.repository import Gdk, Gtk
 
 from pyanaconda.flags import flags
 from pyanaconda.i18n import _, N_
-from pyanaconda.packaging import MetadataError
+from pyanaconda.packaging import MetadataError, PackagePayload
 from pyanaconda.threads import threadMgr, AnacondaThread
 from pyanaconda import constants
 
@@ -164,7 +164,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
 
     @property
     def showable(self):
-        return not flags.livecdInstall and not self.data.method.method == "liveimg"
+        return isinstance(self.payload, PackagePayload)
 
     @property
     def status(self):
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 3fa3234..e399d85 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -41,7 +41,7 @@ from pyanaconda.ui.gui.utils import enlightbox, gtk_action_wait
 from pyanaconda.iutil import ProxyString, ProxyStringError, cmp_obj_attrs
 from pyanaconda.ui.gui.utils import gtk_call_once, really_hide, really_show
 from pyanaconda.threads import threadMgr, AnacondaThread
-from pyanaconda.packaging import PayloadError, MetadataError
+from pyanaconda.packaging import PayloadError, MetadataError, PackagePayload
 from pyanaconda import constants
 
 from blivet.util import get_mount_paths
@@ -765,7 +765,7 @@ class SourceSpoke(NormalSpoke):
 
     @property
     def showable(self):
-        return not flags.livecdInstall and not self.data.method.method == "liveimg"
+        return isinstance(self.payload, PackagePayload)
 
     def _mirror_active(self):
         return self._protocolComboBox.get_active() == PROTOCOL_MIRROR
-- 
1.9.3