[master] Callbacks for exception handling
by Vratislav Podzimek
These patches add outputs of 'lsblk -mfb' and 'nmcli dev list' as attachments
to our bugreports. The former one was requested in bug #879940 the later one
was requested by Radek.
Vratislav Podzimek (2):
Add lsblk output to data gathered after crash (#879940)
Add 'nmcli dev list' output to data gathered after crash
pyanaconda/exception.py | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
--
1.7.11.7
11 years, 3 months
[PATCH 1/3] Don't check memory for rescue mode (#895948).
by Chris Lumens
---
anaconda | 3 +++
1 file changed, 3 insertions(+)
diff --git a/anaconda b/anaconda
index 0f08db3..3198af7 100755
--- a/anaconda
+++ b/anaconda
@@ -352,6 +352,9 @@ def check_memory(anaconda, opts, display_mode=None):
"terminal.")
nolivecd_extra = _(" Starting text mode.")
+ if opts.rescue:
+ return
+
if not display_mode:
display_mode = anaconda.displayMode
--
1.7.11.2
11 years, 3 months
[PATCH 1/4] Initialize network synchronously (#902090)
by Radek Vykydal
There is no use doing these initialization actions in a separate thread,
so let's play safe (races with UI, e.g when setting initial hostname value
as in #902090) and do only waiting for dhcp (for payload initialization)
asynchronously.
---
anaconda | 6 ++++--
pyanaconda/network.py | 12 ++++++------
pyanaconda/packaging/__init__.py | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/anaconda b/anaconda
index f291fb0..f3286b6 100755
--- a/anaconda
+++ b/anaconda
@@ -971,14 +971,16 @@ if __name__ == "__main__":
from pyanaconda.storage import storageInitialize
from pyanaconda.packaging import payloadInitialize
- from pyanaconda.network import networkInitialize
+ from pyanaconda.network import networkInitialize, networkWaitForDhcp
if anaconda.rescue:
from pyanaconda.rescue import doRescue
doRescue(anaconda.rescue_mount, ksdata, anaconda.platform)
+
+ networkInitialize(ksdata)
threadMgr.add(AnacondaThread(name="AnaStorageThread", target=storageInitialize, args=(anaconda.storage, ksdata, anaconda.protected)))
- threadMgr.add(AnacondaThread(name="AnaNetworkThread", target=networkInitialize, args=(ksdata,)))
+ threadMgr.add(AnacondaThread(name="AnaWaitForDhcpThread", target=networkWaitForDhcp, args=(ksdata,)))
threadMgr.add(AnacondaThread(name="AnaPayloadThread", target=payloadInitialize, args=(anaconda.storage, ksdata, anaconda.payload)))
atexit.register(exitHandler, ksdata.reboot, anaconda.storage)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index e814e89..0d9e427 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -1045,24 +1045,24 @@ def setOnboot(ksdata):
dev.set (("ONBOOT", "no"))
dev.writeIfcfgFile()
-# networking initialization and ksdata object update
def networkInitialize(ksdata):
log.debug("network: devices found %s" % getDevices())
logIfcfgFiles("network initialization")
+
if not flags.imageInstall:
- # XXX: this should go to anaconda dracut
if createMissingDefaultIfcfgs():
logIfcfgFiles("ifcfgs created")
- # we set ONBOOT value using network --activate activate in dracut
- # to get devices activated by NM, so set proper ONBOOT value
- # based on --onboot here
+ # For kickstart network --activate option we set ONBOOT=yes
+ # in dracut to get devices activated by NM. The real network --onboot
+ # value is set here.
setOnboot(ksdata)
if ksdata.network.hostname is None:
update_hostname(ksdata)
- # auto default dhcp connection would be activated by NM service
+def networkWaitForDhcp(ksdata):
+ # connection (e.g. auto default dhcp) is activated by NM service
if wait_for_dhcp():
update_hostname(ksdata)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index f724088..c3b2051 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -669,7 +669,7 @@ def payloadInitialize(storage, ksdata, payload):
# FIXME: condition for cases where we don't want network
# (set and use payload.needsNetwork ?)
- networkThread = threadMgr.get("AnaNetworkThread")
+ networkThread = threadMgr.get("AnaWaitForDhcpThread")
if networkThread:
networkThread.join()
--
1.7.11.7
11 years, 3 months
[master] [PATCH] Tell libreport the crash happened in Anaconda (#885690)
by Vratislav Podzimek
There is a new package libreport-anaconda that contains some
configuration files that enable "reporting" over scp/ftp. We
just need to tell libreport that the crash happened in Anaconda.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda.spec.in | 1 +
pyanaconda/exception.py | 1 +
2 files changed, 2 insertions(+)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index b3c81e7..9ec325d 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -100,6 +100,7 @@ BuildRequires: s390utils-devel
Requires: anaconda-widgets = %{version}-%{release}
Requires: gnome-icon-theme-symbolic
Requires: python-meh >= %{mehver}
+Requires: libreport-anaconda >= 2.0.21-1
Requires: policycoreutils
Requires: rpm-python >= %{rpmpythonver}
Requires: parted >= %{partedver}
diff --git a/pyanaconda/exception.py b/pyanaconda/exception.py
index 291adbc..ee6b65c 100644
--- a/pyanaconda/exception.py
+++ b/pyanaconda/exception.py
@@ -180,6 +180,7 @@ def initExceptionHandling(anaconda):
conf.register_callback("lsblk_output", lsblk_callback, attchmnt_only=True)
conf.register_callback("nmcli_dev_list", nmcli_dev_list_callback,
attchmnt_only=True)
+ conf.register_callback("type", lambda: "anaconda", attchmnt_only=True)
handler = AnacondaExceptionHandler(conf, anaconda.intf.meh_interface,
ReverseExceptionDump, anaconda.intf.tty_num)
--
1.7.11.7
11 years, 3 months
[PATCH] Indicate nothing will happen until "Begin Installation" is clicked (#883195).
by Chris Lumens
---
pyanaconda/ui/gui/hubs/summary.glade | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/pyanaconda/ui/gui/hubs/summary.glade b/pyanaconda/ui/gui/hubs/summary.glade
index 36b7aef..f812037 100644
--- a/pyanaconda/ui/gui/hubs/summary.glade
+++ b/pyanaconda/ui/gui/hubs/summary.glade
@@ -114,6 +114,23 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkLabel" id="label1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">1</property>
+ <property name="label" translatable="yes">We won't touch your disks until you hit this button.</property>
+ <attributes>
+ <attribute name="font-desc" value="Cantarell Italic"/>
+ <attribute name="foreground" value="grey"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
</child>
</object>
--
1.7.11.2
11 years, 3 months
[master] [PATCH] Exit anaconda correctly on SIGTERM
by Vratislav Podzimek
We should call sys.exit when we get SIGTERM, so that our exitHandler
get's called.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
anaconda | 1 +
1 file changed, 1 insertion(+)
diff --git a/anaconda b/anaconda
index da77854..5820bd7 100755
--- a/anaconda
+++ b/anaconda
@@ -716,6 +716,7 @@ if __name__ == "__main__":
# reset python's default SIGINT handler
signal.signal(signal.SIGINT, signal.SIG_DFL)
signal.signal(signal.SIGSEGV, isys.handleSegv)
+ signal.signal(signal.SIGTERM, lambda num, frame: sys.exit(1))
setupEnvironment()
# make sure we have /var/log soon, some programs fail to start without it
--
1.7.11.7
11 years, 3 months
[master] [PATCH] Move communication module to pyanaconda/ui
by Vratislav Podzimek
It is not a GUI specific code, so it should live under pyanaconda/ui
instead of pyanaconda/ui/gui. Moreover from pyanaconda/ui/gui it cannot
be imported without X server running.
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/common.py | 4 +--
pyanaconda/ui/communication.py | 58 ++++++++++++++++++++++++++++++++++++
pyanaconda/ui/gui/communication.py | 58 ------------------------------------
pyanaconda/ui/gui/hubs/__init__.py | 2 +-
pyanaconda/ui/gui/spokes/custom.py | 2 +-
pyanaconda/ui/gui/spokes/network.py | 3 +-
pyanaconda/ui/gui/spokes/software.py | 2 +-
pyanaconda/ui/gui/spokes/source.py | 3 +-
pyanaconda/ui/gui/spokes/storage.py | 3 +-
9 files changed, 69 insertions(+), 66 deletions(-)
create mode 100644 pyanaconda/ui/communication.py
delete mode 100644 pyanaconda/ui/gui/communication.py
diff --git a/pyanaconda/ui/common.py b/pyanaconda/ui/common.py
index 902bc9c..b783f5e 100644
--- a/pyanaconda/ui/common.py
+++ b/pyanaconda/ui/common.py
@@ -279,7 +279,7 @@ class Spoke(UIObject):
A spoke's status line on the Hub can also be overloaded to provide
information about why a Spoke is not yet ready, or if an error has
occurred when setting it up. This can be done by calling
- send_message from pyanaconda.ui.gui.communication with the target
+ send_message from pyanaconda.ui.communication with the target
Spoke's class name and the message to be displayed.
If the Spoke was not yet ready when send_message was called, the
@@ -330,7 +330,7 @@ class NormalSpoke(Spoke):
long-lived process (like storage probing) before it's ready.
A Spoke may be marked as ready or not by calling send_ready or
- send_not_ready from pyanaconda.ui.gui.communication with the
+ send_not_ready from pyanaconda.ui.communication with the
target Spoke's class name.
While a Spoke is not ready, a progress message may be shown to
diff --git a/pyanaconda/ui/communication.py b/pyanaconda/ui/communication.py
new file mode 100644
index 0000000..19e3a24
--- /dev/null
+++ b/pyanaconda/ui/communication.py
@@ -0,0 +1,58 @@
+#
+# communication.py: spoke-to-hub communication code
+#
+# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Author(s): Chris Lumens <clumens(a)redhat.com>
+
+import Queue
+
+# A queue to be used for communicating information from a spoke back to its
+# hub. This information includes things like marking spokes as ready and
+# updating the status line to tell the user why a spoke is not yet available.
+# This queue should have elements of the following format pushed into it:
+#
+# (HUB_CODE_*, [arguments])
+#
+# Arguments vary based on the code given, but the first argument must always
+# be the name of the class of the spoke to be acted upon. See below for more
+# details.
+hubQ = Queue.Queue()
+
+# Arguments:
+#
+# _READY - [spoke_name, justUpdate]
+# _NOT_READY - [spoke_name]
+# _MESSAGE - [spoke_name, string]
+HUB_CODE_READY = 0
+HUB_CODE_NOT_READY = 1
+HUB_CODE_MESSAGE = 2
+
+# Convenience methods to put things into the queue without the user having to
+# know the details of the queue.
+def send_ready(spoke, justUpdate=False):
+ """Tell the hub that a spoke given by the name "spoke" has become ready,
+ and that it should be made sensitive on the hub. Some processing may
+ also occur after a spoke has become ready. However, if the justUpdate
+ parameter is True, no processing will occur.
+ """
+ hubQ.put((HUB_CODE_READY, [spoke, justUpdate]))
+
+def send_not_ready(spoke):
+ hubQ.put((HUB_CODE_NOT_READY, [spoke]))
+
+def send_message(spoke, msg):
+ hubQ.put((HUB_CODE_MESSAGE, [spoke, msg]))
diff --git a/pyanaconda/ui/gui/communication.py b/pyanaconda/ui/gui/communication.py
deleted file mode 100644
index 19e3a24..0000000
--- a/pyanaconda/ui/gui/communication.py
+++ /dev/null
@@ -1,58 +0,0 @@
-#
-# communication.py: spoke-to-hub communication code
-#
-# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program. If not, see <http://www.gnu.org/licenses/>.
-#
-# Author(s): Chris Lumens <clumens(a)redhat.com>
-
-import Queue
-
-# A queue to be used for communicating information from a spoke back to its
-# hub. This information includes things like marking spokes as ready and
-# updating the status line to tell the user why a spoke is not yet available.
-# This queue should have elements of the following format pushed into it:
-#
-# (HUB_CODE_*, [arguments])
-#
-# Arguments vary based on the code given, but the first argument must always
-# be the name of the class of the spoke to be acted upon. See below for more
-# details.
-hubQ = Queue.Queue()
-
-# Arguments:
-#
-# _READY - [spoke_name, justUpdate]
-# _NOT_READY - [spoke_name]
-# _MESSAGE - [spoke_name, string]
-HUB_CODE_READY = 0
-HUB_CODE_NOT_READY = 1
-HUB_CODE_MESSAGE = 2
-
-# Convenience methods to put things into the queue without the user having to
-# know the details of the queue.
-def send_ready(spoke, justUpdate=False):
- """Tell the hub that a spoke given by the name "spoke" has become ready,
- and that it should be made sensitive on the hub. Some processing may
- also occur after a spoke has become ready. However, if the justUpdate
- parameter is True, no processing will occur.
- """
- hubQ.put((HUB_CODE_READY, [spoke, justUpdate]))
-
-def send_not_ready(spoke):
- hubQ.put((HUB_CODE_NOT_READY, [spoke]))
-
-def send_message(spoke, msg):
- hubQ.put((HUB_CODE_MESSAGE, [spoke, msg]))
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 1f5141a..b704fa8 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -262,7 +262,7 @@ class Hub(GUIObject, common.Hub):
self.continueButton.set_sensitive(self.continuePossible)
def _update_spokes(self):
- from pyanaconda.ui.gui import communication
+ from pyanaconda.ui import communication
import Queue
q = communication.hubQ
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 8f38eb4..7099ac4 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -73,8 +73,8 @@ from pyanaconda.storage.errors import MDRaidError
from pyanaconda.storage.devicelibs import mdraid
from pyanaconda.storage.devices import LUKSDevice
+from pyanaconda.ui import communication
from pyanaconda.ui.gui import GUIObject
-from pyanaconda.ui.gui import communication
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.spokes.storage import StorageChecker
from pyanaconda.ui.gui.spokes.lib.cart import SelectedDisksDialog
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index e8f2b94..161e6ad 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -35,7 +35,8 @@
from gi.repository import Gtk, AnacondaWidgets
from pyanaconda.flags import flags
-from pyanaconda.ui.gui import GUIObject, communication
+from pyanaconda.ui import communication
+from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.spokes import NormalSpoke, StandaloneSpoke
from pyanaconda.ui.gui.categories.software import SoftwareCategory
from pyanaconda.ui.gui.hubs.summary import SummaryHub
diff --git a/pyanaconda/ui/gui/spokes/software.py b/pyanaconda/ui/gui/spokes/software.py
index 8ab93d3..cbaf8f0 100644
--- a/pyanaconda/ui/gui/spokes/software.py
+++ b/pyanaconda/ui/gui/spokes/software.py
@@ -27,7 +27,7 @@ from pyanaconda.flags import flags
from pyanaconda.kickstart import packagesSeen
from pyanaconda.threads import threadMgr, AnacondaThread
-from pyanaconda.ui.gui import communication
+from pyanaconda.ui import communication
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.spokes.lib.detailederror import DetailedErrorDialog
from pyanaconda.ui.gui.utils import enlightbox, gtk_thread_wait
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index c7149da..7faf0bc 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -34,7 +34,8 @@ from gi.repository import AnacondaWidgets, GLib, Gtk
from pyanaconda.flags import flags
from pyanaconda.image import opticalInstallMedia, potentialHdisoSources
-from pyanaconda.ui.gui import GUIObject, communication
+from pyanaconda.ui import communication
+from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.categories.software import SoftwareCategory
from pyanaconda.ui.gui.utils import enlightbox, gtk_thread_wait
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 6efd00d..d7951d2 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -40,7 +40,8 @@
from gi.repository import Gdk, GLib, Gtk
from gi.repository import AnacondaWidgets
-from pyanaconda.ui.gui import GUIObject, communication
+from pyanaconda.ui import communication
+from pyanaconda.ui.gui import GUIObject
from pyanaconda.ui.gui.spokes import NormalSpoke
from pyanaconda.ui.gui.spokes.lib.cart import SelectedDisksDialog
from pyanaconda.ui.gui.spokes.lib.passphrase import PassphraseDialog
--
1.7.11.7
11 years, 3 months
[PATCH] Use only one large grid for the hubs.
by Chris Lumens
This makes the spoke selectors on rows by theirselves much smaller. They
no longer extend all the way to the right edge of the screen.
---
pyanaconda/ui/gui/categories/__init__.py | 29 -------------------------
pyanaconda/ui/gui/hubs/__init__.py | 36 ++++++++++++++++++++++++--------
2 files changed, 27 insertions(+), 38 deletions(-)
diff --git a/pyanaconda/ui/gui/categories/__init__.py b/pyanaconda/ui/gui/categories/__init__.py
index 14dc2a0..7a75e5c 100644
--- a/pyanaconda/ui/gui/categories/__init__.py
+++ b/pyanaconda/ui/gui/categories/__init__.py
@@ -43,34 +43,6 @@ class SpokeCategory(object):
displayOnHub = None
title = N_("DEFAULT TITLE")
- def grid(self, selectors):
- """Construct a Gtk.Grid consisting of two columns from the provided
- list of selectors.
- """
- from gi.repository import Gtk
-
- if len(selectors) == 0:
- return None
-
- row = 0
- col = 0
-
- g = Gtk.Grid()
- g.set_row_homogeneous(True)
- g.set_column_homogeneous(True)
- g.set_row_spacing(6)
- g.set_column_spacing(6)
- g.set_margin_bottom(12)
-
- for selector in selectors:
- g.attach(selector, col, row, 1, 1)
-
- col = int(not col)
- if col == 0:
- row += 1
-
- return g
-
def collect_categories(mask_paths):
"""Return a list of all category subclasses. Look for them in modules
imported as module_mask % basename(f) where f is name of all files in path.
@@ -80,4 +52,3 @@ def collect_categories(mask_paths):
categories.extend(collect(mask, path, lambda obj: getattr(obj, "displayOnHub", None) != None))
return categories
-
diff --git a/pyanaconda/ui/gui/hubs/__init__.py b/pyanaconda/ui/gui/hubs/__init__.py
index 1f5141a..510c624 100644
--- a/pyanaconda/ui/gui/hubs/__init__.py
+++ b/pyanaconda/ui/gui/hubs/__init__.py
@@ -132,15 +132,21 @@ class Hub(GUIObject, common.Hub):
ret[c] = collect_spokes(self.paths["spokes"], c.__name__)
return ret
-
+
def _createBox(self):
from gi.repository import Gtk, AnacondaWidgets
from pyanaconda.ui.gui.utils import setViewportBackground
cats_and_spokes = self._collectCategoriesAndSpokes()
categories = cats_and_spokes.keys()
-
- box = Gtk.VBox(False, 6)
+
+ grid = Gtk.Grid()
+ grid.set_row_spacing(6)
+ grid.set_column_spacing(6)
+ grid.set_column_homogeneous(True)
+ grid.set_margin_bottom(12)
+
+ row = 0
for c in sorted(categories, key=lambda c: c.title):
obj = c()
@@ -206,16 +212,28 @@ class Hub(GUIObject, common.Hub):
label = Gtk.Label("<span font-desc=\"Sans 14\">%s</span>" % _(obj.title))
label.set_use_markup(True)
label.set_halign(Gtk.Align.START)
+ label.set_margin_top(12)
label.set_margin_bottom(12)
- box.pack_start(label, False, True, 0)
-
- grid = obj.grid(selectors)
- grid.set_margin_left(12)
- box.pack_start(grid, False, True, 0)
+ grid.attach(label, 0, row, 2, 1)
+ row += 1
+
+ col = 0
+ for selector in selectors:
+ selector.set_margin_left(12)
+ grid.attach(selector, col, row, 1, 1)
+ col = int(not col)
+ if col == 0:
+ row += 1
+
+ # If this category contains an odd number of selectors, the above
+ # row += 1 will not have run for the last row, which puts the next
+ # category's title in the wrong place.
+ if len(selectors) % 2:
+ row += 1
spokeArea = self.window.get_spoke_area()
viewport = Gtk.Viewport()
- viewport.add(box)
+ viewport.add(grid)
spokeArea.add(viewport)
setViewportBackground(viewport)
--
1.7.11.2
11 years, 3 months
[PATCH 1/4] Don't allow mountpoints to start with /proc or /sys either.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/custom.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pyanaconda/ui/gui/spokes/custom.py b/pyanaconda/ui/gui/spokes/custom.py
index 8f38eb4..6b3a4e4 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -206,7 +206,8 @@ def validate_mountpoint(mountpoint, used_mountpoints, strict=True):
valid = MOUNTPOINT_IN_USE
elif not mountpoint:
valid = MOUNTPOINT_EMPTY
- elif mountpoint.startswith("/dev"):
+ elif mountpoint.startswith("/dev") or mountpoint.startswith("/proc") or \
+ mountpoint.startswith("/sys"):
valid = MOUNTPOINT_INVALID
elif (mountpoint.lower() not in fake_mountpoints and
((len(mountpoint) > 1 and mountpoint.endswith("/")) or
--
1.7.11.2
11 years, 3 months
[PATCH] On the storage spoke, only show the summary button if a disk is selected.
by Chris Lumens
---
pyanaconda/ui/gui/spokes/storage.glade | 5 +++--
pyanaconda/ui/gui/spokes/storage.py | 6 ++++--
2 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/pyanaconda/ui/gui/spokes/storage.glade b/pyanaconda/ui/gui/spokes/storage.glade
index 047abbf..ca19e72 100644
--- a/pyanaconda/ui/gui/spokes/storage.glade
+++ b/pyanaconda/ui/gui/spokes/storage.glade
@@ -961,12 +961,13 @@
<property name="relief">none</property>
<property name="use_underline">True</property>
<property name="focus_on_click">False</property>
+ <property name="no_show_all">True</property>
<property name="xalign">0</property>
<signal name="clicked" handler="on_summary_clicked" swapped="no"/>
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">2</property>
+ <property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
@@ -984,7 +985,7 @@
</object>
<packing>
<property name="left_attach">0</property>
- <property name="top_attach">1</property>
+ <property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
diff --git a/pyanaconda/ui/gui/spokes/storage.py b/pyanaconda/ui/gui/spokes/storage.py
index 6efd00d..fd85540 100644
--- a/pyanaconda/ui/gui/spokes/storage.py
+++ b/pyanaconda/ui/gui/spokes/storage.py
@@ -576,6 +576,10 @@ class StorageSpoke(NormalSpoke, StorageChecker):
count) % (count, str(Size(spec="%s MB" % capacity)), free))
summary_label = self.builder.get_object("summary_label")
summary_label.set_text(summary)
+ summary_label.set_sensitive(count > 0)
+
+ summary_button = self.builder.get_object("summary_button")
+ summary_button.set_visible(count > 0)
if len(self.disks) == 0:
self.set_warning(_("No disks detected. Please shut down the computer, connect at least one disk, and restart to complete installation."))
@@ -584,8 +588,6 @@ class StorageSpoke(NormalSpoke, StorageChecker):
else:
self.clear_info()
- self.builder.get_object("summary_label").set_sensitive(count > 0)
-
def _update_disk_list(self):
""" Update self.selected_disks based on the UI. """
overviews = self.local_disks_box.get_children()
--
1.7.11.2
11 years, 3 months