[PATCH] checkisomd5 hack
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
A. This is untested, I'm looking for comments before I go to the trouble of
building an iso with it.
B. I don't really like any of these options, but this is the best one I can
think of right now.
rd.live.check isn't doing anything for the non-livecd install media. The
problem is that dmsquash-live-root needs the device in order for its call to
checkisomd5 to work and anaconda-dracut always passes the path to the image.
The options I see are:
1. move the checkisomd5 into a dracut-lib function. The problem with this is
that adds dependencies (checkisomd5) to every use of dracut.
2. pass the device to anaconda_live_root_dir, pass that as an option to
dmsquash-live-root and have it check for an optional device argument to run
checkisomd5 on. I like this option the least.
3. copy the checkisomd5 code from dmsquash-live-root to anaconda-lib. This
introduces a dep on dracut-lib inside our lib because of the getarg function.
I'm not sure if that's a problem or not. If not, this would be my 1st choice.
4. copy it into anaconda-diskroot which is the only place it will be used
anyway.
#4 is in the following patch. I like #3 as long as adding dracut-lib to every
call of anaconda-lib won't cause problems.
Brian C. Lane (1):
run checkisomd5 from anaconda-diskroot (#848764)
dracut/anaconda-diskroot | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--
1.7.11.7
11 years, 6 months
[PATCH 1/5] If NFS is selected in the source spoke, the URL must contain a colon (#869103).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/source.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 6fa7e8e..65d6b28 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -490,9 +490,10 @@ class SourceSpoke(NormalSpoke):
elif self._nfs_active():
url = self._urlEntry.get_text().strip()
- # If the user didn't fill in the URL entry, just return as if
- # they selected nothing.
- if url == "":
+ # If the user didn't fill in the URL entry, or it does not contain
+ # a ':' (so, no host/directory split), just return as if they
+ # selected nothing.
+ if url == "" or not ':' in url:
return
self.data.method.method = "nfs"
@@ -641,7 +642,7 @@ class SourceSpoke(NormalSpoke):
selector.path = cdrom.path
selector.set_chosen(chosen)
self._autodetectMediaBox.pack_start(selector, False, False, 0)
-
+
gtk_action_1()
added = True
--
1.7.11.2
11 years, 6 months
[master] Support for layout switching configuration
by Vratislav Podzimek
These patches add support for layout switching configuration both via kickstart
and in the Keyboard spoke.
Video preview can be seen at:
http://vpodzime.fedorapeople.org/LayoutSwitching_dialog.webm
Comments are, of course, welcome.
Vratislav Podzimek (4):
Add support for layout switching options to XklWrapper
Save layout switching configuration
Initialize layout switching if needed
Add dialog for configuring layout switching options
pyanaconda/keyboard.py | 56 ++++++++--
pyanaconda/ui/gui/spokes/keyboard.glade | 181 +++++++++++++++++++++++++++++++-
pyanaconda/ui/gui/spokes/keyboard.py | 133 +++++++++++++++++++++++
pyanaconda/ui/gui/spokes/welcome.py | 16 ++-
4 files changed, 369 insertions(+), 17 deletions(-)
--
1.7.11.7
11 years, 6 months
[PATCH 1/5] payloadInstallHandler should only optionally take a package argument (#868542).
by Chris Lumens
---
pyanaconda/errors.py | 14 ++++++++++----
pyanaconda/packaging/yumpayload.py | 6 +++---
2 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/pyanaconda/errors.py b/pyanaconda/errors.py
index 89b76d5..17e75a0 100644
--- a/pyanaconda/errors.py
+++ b/pyanaconda/errors.py
@@ -214,10 +214,16 @@ class ErrorHandler(object):
return ERROR_RAISE
def _payloadInstallHandler(self, *args, **kwargs):
- package = args[0]
- message = _("There was an error installing the %s package. This is "
- "a fatal error and installation will be aborted.") % \
- package
+ package = kwargs.pop("package", None)
+ if package:
+ message = _("There was an error installing the %s package. This is "
+ "a fatal error and installation will be aborted.") % \
+ package
+ else:
+ message = _("The following error occurred while installing. This is "
+ "a fatal error and installation will be aborted.")
+ message += "\n\n" + str(kwargs["exception"])
+
self.ui.showError(message)
return ERROR_RAISE
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index b206827..73455d4 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -1443,7 +1443,7 @@ class RPMCallback(object):
except URLGrabError as e:
log.error("URLGrabError: %s" % (e,))
exn = PayloadInstallError("failed to get package")
- if errorHandler.cb(exn, txmbr.po) == ERROR_RAISE:
+ if errorHandler.cb(exn, package=txmbr.po) == ERROR_RAISE:
raise exn
except (yum.Errors.NoMoreMirrorsRepoError, IOError):
if os.path.exists(txmbr.po.localPkg()):
@@ -1451,7 +1451,7 @@ class RPMCallback(object):
log.debug("retrying download of %s" % txmbr.po)
continue
exn = PayloadInstallError("failed to open package")
- if errorHandler.cb(exn, txmbr.po) == ERROR_RAISE:
+ if errorHandler.cb(exn, package=txmbr.po) == ERROR_RAISE:
raise exn
except yum.Errors.RepoError:
continue
@@ -1491,5 +1491,5 @@ class RPMCallback(object):
# unpack problems.
if event != rpm.RPMCALLBACK_SCRIPT_ERROR or total:
exn = PayloadInstallError("cpio, unpack, or fatal script error")
- if errorHandler.cb(exn, name) == ERROR_RAISE:
+ if errorHandler.cb(exn, package=name) == ERROR_RAISE:
raise exn
--
1.7.11.2
11 years, 6 months
[master] [PATCH] Do not exit if there are some threads still running
by Vratislav Podzimek
This makes kickstart installations work. Without this patch code
in pyanaconda/ui/gui/hubs/__init__.py/_update_spokes() exits
anaconda 1 second after going to progress hub.
This should definitely be resolved in a better way, but still we shouldn't
call sys.exit() when we have some threads still running.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/threads.py | 6 ++++++
pyanaconda/ui/gui/__init__.py | 7 +++++--
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/threads.py b/pyanaconda/threads.py
index 55fe141..1e3940e 100644
--- a/pyanaconda/threads.py
+++ b/pyanaconda/threads.py
@@ -66,6 +66,12 @@ class ThreadManager(object):
"""
return self._objs.get(name)
+ @property
+ def have_running_threads(self):
+ """Returns whether there are any running threads or not."""
+
+ return bool(self._objs)
+
class AnacondaThread(threading.Thread):
"""A threading.Thread subclass that exists only for a couple purposes:
diff --git a/pyanaconda/ui/gui/__init__.py b/pyanaconda/ui/gui/__init__.py
index fa80e6d..bf78ae5 100644
--- a/pyanaconda/ui/gui/__init__.py
+++ b/pyanaconda/ui/gui/__init__.py
@@ -25,6 +25,7 @@ from gi.repository import Gdk
from pyanaconda.ui import UserInterface, common
from pyanaconda.ui.gui.utils import enlightbox, gtk_thread_wait
+from pyanaconda.threads import threadMgr
import gettext
_ = lambda x: gettext.ldgettext("anaconda", x)
@@ -173,9 +174,11 @@ class GraphicalUserInterface(UserInterface):
### SIGNAL HANDLING METHODS
###
def _on_continue_clicked(self):
- # If we're on the last screen, clicking Continue quits.
+ # If we're on the last screen and there are no threads running,
+ # clicking Continue quits.
if len(self._actions) == 1:
- sys.exit(0)
+ if not threadMgr.have_running_threads:
+ sys.exit(0)
return
ndx = 0
--
1.7.11.7
11 years, 6 months
[PATCH] Add a reformat checkbutton to indicate a desire to reformat the device.
by David Lehman
---
pyanaconda/ui/gui/spokes/custom.glade | 16 +++-
pyanaconda/ui/gui/spokes/custom.py | 197 ++++++++++++++++++++-------------
2 files changed, 136 insertions(+), 77 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.glade b/pyanaconda/ui/gui/spokes/custom.glade
index b4ae700..d297e0b 100644
--- a/pyanaconda/ui/gui/spokes/custom.glade
+++ b/pyanaconda/ui/gui/spokes/custom.glade
@@ -1208,7 +1208,21 @@ you'll be able to view their details here.</property>
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkCheckButton" id="reformatCheckbox">
+ <property name="label" translatable="yes">Reformat</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="on_reformat_toggled" swapped="no"/>
+ </object>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
</child>
</object>
</child>
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index f64d416..dac54bb 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -900,6 +900,9 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
device_type = device_type_map[device_type]
log.debug("new device type: %s" % device_type)
+ reformat = self.builder.get_object("reformatCheckbox").get_active()
+ log.debug("reformat: %s" % reformat)
+
fs_type_combo = self.builder.get_object("fileSystemTypeCombo")
fs_type_index = fs_type_combo.get_active()
fs_type = fs_type_combo.get_model()[fs_type_index][0]
@@ -907,10 +910,18 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
prev_encrypted = device.encrypted
log.debug("old encryption setting: %s" % prev_encrypted)
- encrypted = self.builder.get_object("encryptCheckbox").get_active()
+ encryption_checkbox = self.builder.get_object("encryptCheckbox")
+ encrypted = None
+ if encryption_checkbox.get_sensitive():
+ encrypted = encryption_checkbox.get_active()
+
log.debug("new encryption setting: %s" % encrypted)
- label = self.builder.get_object("labelEntry").get_text()
+ label_entry = self.builder.get_object("labelEntry")
+ label = ""
+ if label_entry.get_sensitive():
+ label = label_entry.get_text()
+
old_label = getattr(device.format, "label", "") or ""
mountpoint = None # None means format type is not mountable
@@ -1138,81 +1149,88 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._updateSpaceDisplay()
self._populate_right_side(selector)
- ##
- ## ENCRYPTION
- ##
- old_device = device
- if prev_encrypted and not encrypted:
- log.info("removing encryption from %s" % device.name)
- with ui_storage_logger():
- self.__storage.destroyDevice(device)
- self._devices.remove(device)
- old_device = device
- device = device.slave
- selector._device = device
- for s in self._accordion.allSelectors:
- if s._device == old_device:
- s._device = device
- elif encrypted and not prev_encrypted:
- log.info("applying encryption to %s" % device.name)
- with ui_storage_logger():
- old_device = device
- new_fmt = getFormat("luks", device=device.path)
- self.__storage.formatDevice(device, new_fmt)
- luks_dev = LUKSDevice("luks-" + device.name,
- parents=[device])
- self.__storage.createDevice(luks_dev)
- self._devices.append(luks_dev)
- device = luks_dev
- selector._device = device
- for s in self._accordion.allSelectors:
- if s._device == old_device:
- s._device = device
-
- ##
- ## FORMATTING
- ##
- if fs_type != device.format.name:
- self.clear_errors()
- with ui_storage_logger():
- old_format = device.format
- new_format = getFormat(fs_type,
- mountpoint=mountpoint, label=label,
- device=device.path)
- try:
- self.__storage.formatDevice(device, new_format)
- except StorageError as e:
- log.error("failed to register device format action: %s" % e)
- device.format = old_format
- self._error = e
- self.window.set_info(Gtk.MessageType.WARNING,
- _("Device reformat request failed. "
- "Click for details."))
- self.window.show_all()
- else:
- # first, remove this selector from any old install page(s)
- new_selector = None
- for page in self._accordion.allPages:
- for _selector in getattr(page, "_members", []):
- if _selector._device in (device, old_device):
- if page.pageTitle == new_install_name:
- new_selector = _selector
- continue
-
- page.removeSelector(_selector)
- if not page._members:
- log.debug("removing empty page %s" % page.pageTitle)
- self._accordion.removePage(page.pageTitle)
-
- # either update the existing selector or add a new one
- if new_selector:
- new_selector.props.mountpoint = mountpoint or ""
- new_selector.props.name = (self._mountpointName(mountpoint)
- or device.format.name)
+ if reformat:
+ ##
+ ## ENCRYPTION
+ ##
+ old_fs_type = device.format.type
+ old_device = device
+ if prev_encrypted and not encrypted:
+ log.info("removing encryption from %s" % device.name)
+ with ui_storage_logger():
+ self.__storage.destroyDevice(device)
+ self._devices.remove(device)
+ old_device = device
+ device = device.slave
+ selector._device = device
+ for s in self._accordion.allSelectors:
+ if s._device == old_device:
+ s._device = device
+ elif encrypted and not prev_encrypted:
+ log.info("applying encryption to %s" % device.name)
+ with ui_storage_logger():
+ old_device = device
+ new_fmt = getFormat("luks", device=device.path)
+ self.__storage.formatDevice(device, new_fmt)
+ luks_dev = LUKSDevice("luks-" + device.name,
+ parents=[device])
+ self.__storage.createDevice(luks_dev)
+ self._devices.append(luks_dev)
+ device = luks_dev
+ selector._device = device
+ for s in self._accordion.allSelectors:
+ if s._device == old_device:
+ s._device = device
+
+ ##
+ ## FORMATTING
+ ##
+ encryption_changed = (device != old_device)
+ fs_type_changed = (fs_type_short != old_fs_type)
+ fs_exists = old_device.format.exists
+ if encryption_changed or fs_type_changed or fs_exists:
+ log.info("scheduling reformat of %s as %s" % (device.name,
+ fs_type_short))
+ self.clear_errors()
+ with ui_storage_logger():
+ old_format = device.format
+ new_format = getFormat(fs_type,
+ mountpoint=mountpoint, label=label,
+ device=device.path)
+ try:
+ self.__storage.formatDevice(device, new_format)
+ except StorageError as e:
+ log.error("failed to register device format action: %s" % e)
+ device.format = old_format
+ self._error = e
+ self.window.set_info(Gtk.MessageType.WARNING,
+ _("Device reformat request failed. "
+ "Click for details."))
+ self.window.show_all()
else:
- self.add_new_selector(device)
+ # first, remove this selector from any old install page(s)
+ new_selector = None
+ for page in self._accordion.allPages:
+ for _selector in getattr(page, "_members", []):
+ if _selector._device in (device, old_device):
+ if page.pageTitle == new_install_name:
+ new_selector = _selector
+ continue
+
+ page.removeSelector(_selector)
+ if not page._members:
+ log.debug("removing empty page %s" % page.pageTitle)
+ self._accordion.removePage(page.pageTitle)
+
+ # either update the existing selector or add a new one
+ if new_selector:
+ new_selector.props.mountpoint = mountpoint or ""
+ new_selector.props.name = (self._mountpointName(mountpoint)
+ or device.format.name)
+ else:
+ self.add_new_selector(device)
- return
+ return
##
## FORMATTING ATTRIBUTES
@@ -1397,6 +1415,7 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
def _populate_right_side(self, selector):
log.debug("populate_right_side: %s" % selector._device)
encryptCheckbox = self.builder.get_object("encryptCheckbox")
+ reformatCheckbox = self.builder.get_object("reformatCheckbox")
labelEntry = self.builder.get_object("labelEntry")
mountPointEntry = self.builder.get_object("mountPointEntry")
selectedDeviceLabel = self.builder.get_object("selectedDeviceLabel")
@@ -1447,7 +1466,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
else:
sizeSpinner.set_tooltip_text(_("This file system may not be resized."))
+ reformatCheckbox.set_active(not device.format.exists)
+ reformatCheckbox.set_sensitive(use_dev.exists)
encryptCheckbox.set_active(device.encrypted)
+ encryptCheckbox.set_sensitive(reformatCheckbox.get_active())
##
## Set up the filesystem type combo.
@@ -1479,6 +1501,8 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
device.originalFormat.type not in self._fs_types:
fsCombo.append_text(device.originalFormat.name)
+ fsCombo.set_sensitive(reformatCheckbox.get_active())
+
##
## Set up the device type combo.
##
@@ -1894,6 +1918,25 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
self._updateSpaceDisplay()
log.debug("finished updating space display")
+ def on_reformat_toggled(self, widget):
+ active = widget.get_active()
+
+ encryption_checkbutton = self.builder.get_object("encryptCheckbox")
+ encryption_checkbutton.set_sensitive(active)
+
+ fs_combo = self.builder.get_object("fileSystemTypeCombo")
+ fs_combo.set_sensitive(active)
+
+ # The label entry can only be sensitive if reformat is active and the
+ # currently selected filesystem can be labeled.
+ label_active = active
+ if active:
+ fmt = getFormat(fs_combo.get_active_text())
+ label_active = active and hasattr(fmt, "label")
+
+ label_entry = self.builder.get_object("labelEntry")
+ label_entry.set_sensitive(label_active)
+
def on_fs_type_changed(self, combo):
if not self._initialized:
return
@@ -1905,8 +1948,10 @@ class CustomPartitioningSpoke(NormalSpoke, StorageChecker):
fmt = getFormat(new_type)
mountPointEntry = self.builder.get_object("mountPointEntry")
labelEntry = self.builder.get_object("labelEntry")
+ reformat_checkbox = self.builder.get_object("reformatCheckbox")
# FIXME: can't set a label on an existing format as of now
- labelEntry.set_sensitive(hasattr(fmt, "label"))
+ labelEntry.set_sensitive(reformat_checkbox.get_active() and
+ hasattr(fmt, "label"))
mountPointEntry.set_sensitive(fmt.mountable)
def on_device_type_changed(self, combo):
--
1.7.7.6
11 years, 6 months
[lorax] perl is required by some low-level tools on s390x (#868824)
by Dan Horák
Don't remove perl on s390x as it is required by some low-level tools.
---
share/runtime-cleanup.tmpl | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/share/runtime-cleanup.tmpl b/share/runtime-cleanup.tmpl
index 97dd38f..1791cae 100644
--- a/share/runtime-cleanup.tmpl
+++ b/share/runtime-cleanup.tmpl
@@ -5,8 +5,10 @@
remove usr/share/i18n
## not required packages installed as dependencies
-## no perl (it gets pulled in on ppc)
-removepkg perl*
+## no perl besides s390x
+%if basearch != "s390x":
+ removepkg perl*
+%endif
## no sound support, thanks
removepkg alsa* flac gstreamer-tools libsndfile pulseaudio* sound-theme-freedesktop
removepkg midisport-firmware
--
1.7.7.6
11 years, 6 months
[PATCH] Lock source spoke while depsolving (#867591)
by Jesse Keating
This is a cheap fix, while a longer term effort to make this thread safe
can be explored.
---
pyanaconda/ui/gui/spokes/software.py | 4 +++-
pyanaconda/ui/gui/spokes/source.py | 7 ++++++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 231e478..159c4c1 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -78,6 +78,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
self.payload.selectGroup(group)
communication.send_not_ready(self.__class__.__name__)
+ communication.send_not_ready("SourceSpoke")
threadMgr.add(AnacondaThread(name="AnaCheckSoftwareThread",
target=self.checkSoftwareSelection))
@@ -97,6 +98,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
self._tx_id = self.payload.txID
finally:
communication.send_ready(self.__class__.__name__)
+ communication.send_ready("SourceSpoke")
@property
def completed(self):
@@ -115,7 +117,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
def ready(self):
# By default, the software selection spoke is not ready. We have to
# wait until the installation source spoke is completed. This could be
- # becasue the user filled something out, or because we're done fetching
+ # 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
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 6fa7e8e..a88f6ce 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -549,10 +549,15 @@ class SourceSpoke(NormalSpoke):
# By default, the source spoke is not ready. We have to wait until
# storageInitialize is done to know whether or not there's local
# devices potentially holding install media.
- return (self._ready and not threadMgr.get("AnaPayloadMDThread"))
+ log.info('source spoke ready: %s' % self._ready)
+ return (self._ready and not threadMgr.get("AnaPayloadMDThread") and
+ not threadMgr.get("AnaCheckSoftwareThread"))
@property
def status(self):
+ from pyanaconda.threads import threadMgr
+ if threadMgr.get("AnaCheckSoftwareThread"):
+ return _("Checking software dependencies...")
if not self.ready:
return _("Not ready")
if self.data.method.method == "url":
--
1.7.11.4
11 years, 6 months
[PATCH 1/3] If nothing's changed in the software spoke, don't redo dep solving.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/software.py | 35 +++++++++++++++++++++++++++--------
1 file changed, 27 insertions(+), 8 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 231e478..b091c9f 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -62,6 +62,10 @@ class SoftwareSelectionSpoke(NormalSpoke):
self._addRepoDialog = AdditionalReposDialog(self.data)
+ # Used for detecting whether anything's changed in the spoke.
+ self._origAddons = []
+ self._origEnvironment = None
+
def apply(self):
# NOTE: Other apply methods work directly with the ksdata, but this
# one does not. However, selectGroup/deselectGroup modifies ksdata as
@@ -69,13 +73,25 @@ class SoftwareSelectionSpoke(NormalSpoke):
from pyanaconda.threads import threadMgr, AnacondaThread
row = self._get_selected_environment()
- if row:
- self._selectFlag = False
- self.payload.data.packages.groupList = []
- self.payload.selectEnvironment(row[2])
- self.environment = row[2]
- for group in self.selectedGroups:
- self.payload.selectGroup(group)
+ if not row:
+ return
+
+ addons = self._get_selected_addons()
+
+ # Don't redo dep solving if nothing's changed.
+ if row[2] == self._origEnvironment and set(addons) == set(self._origAddons):
+ return
+
+ self._selectFlag = False
+ self.payload.data.packages.groupList = []
+ self.payload.selectEnvironment(row[2])
+ self.environment = row[2]
+ for group in self.selectedGroups:
+ self.payload.selectGroup(group)
+
+ # And then save these values so we can check next time.
+ self._origAddons = addons
+ self._origEnvironment = self.environment
communication.send_not_ready(self.__class__.__name__)
threadMgr.add(AnacondaThread(name="AnaCheckSoftwareThread",
@@ -200,7 +216,7 @@ class SoftwareSelectionSpoke(NormalSpoke):
communication.send_message(self.__class__.__name__,
_("No installation source available"))
return False
-
+
def refresh(self):
from pyanaconda.threads import threadMgr
NormalSpoke.refresh(self)
@@ -254,6 +270,9 @@ class SoftwareSelectionSpoke(NormalSpoke):
if self._errorMsgs:
self.window.set_info(Gtk.MessageType.WARNING, _("Error checking software dependencies. Click for details."))
+ def _get_selected_addons(self):
+ return [row[2] for row in self._addonStore if row[0]]
+
# Returns the row in the store corresponding to what's selected on the
# left hand panel, or None if nothing's selected.
def _get_selected_environment(self):
--
1.7.11.2
11 years, 6 months
[PATCH] Network spoke: fix callback arguments for device add/remove.
by Radek Vykydal
---
pyanaconda/ui/gui/spokes/network.py | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 21a9eae..26cf3e7 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -405,10 +405,10 @@ class NetworkControlBox():
self.client.add_and_activate_connection(None, device, ap_obj_path,
None, None)
- def on_device_added(self, device):
+ def on_device_added(self, device, *args):
self.add_device(device)
- def on_device_removed(self, device):
+ def on_device_removed(self, device, *args):
self.remove_device(device)
def on_edit_connection(self, *args):
--
1.7.4
11 years, 6 months