[master] [PATCH] Test if path is valid before using it (NTPConfigDialog)
by Vratislav Podzimek
Somehow (I cannot reproduce it) it could happen that on_server_edited
gets None as path and instead of crashing it should just do nothing in
such cases.
Resolves: rhbz#880430
Signed-off-by: Vratislav Podzimek <vpodzime(a)redhat.com>
---
pyanaconda/ui/gui/spokes/datetime_spoke.py | 3 +++
1 file changed, 3 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/datetime_spoke.py b/pyanaconda/ui/gui/spokes/datetime_spoke.py
index cfc23f5..e44c864 100644
--- a/pyanaconda/ui/gui/spokes/datetime_spoke.py
+++ b/pyanaconda/ui/gui/spokes/datetime_spoke.py
@@ -248,6 +248,9 @@ class NTPconfigDialog(GUIObject):
self._serversStore.set_value(itr, 2, not old_value)
def on_server_edited(self, renderer, path, new_text, *args):
+ if not path:
+ return
+
itr = self._serversStore.get_iter(path)
if self._serversStore[itr][0] == new_text:
--
1.7.11.7
11 years, 5 months
[PATCH] Bootloader checking should work in terms of self.stage1/2_ attrs (#880319).
by Chris Lumens
---
pyanaconda/bootloader.py | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index f2c302c..fd68571 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1568,27 +1568,27 @@ class GRUB2(GRUB):
self.errors = []
self.warnings = []
- for (stage1dev, stage2dev) in self.install_targets:
- if stage1dev == stage2dev:
- continue
+ if self.stage1_device == self.stage2_device:
+ return ret
- # These are small enough to fit
- if stage2dev.format.type in ("ext2", "ext3", "ext4") \
- and stage2dev.type == "partition":
- continue
+ # These are small enough to fit
+ if self.stage2_device.format.type in ("ext2", "ext3", "ext4") \
+ and self.stage2_device.type == "partition":
+ return ret
+
+ # If the first partition starts too low show an error.
+ parts = self.stage1_disk.format.partedDisk.partitions
+ for p in parts:
+ start = p.geometry.start * p.disk.device.sectorSize
+ if not p.getFlag(PARTITION_BIOS_GRUB) and start < 1024*512:
+ msg = _("%s may not have enough space for grub2 to embed "
+ "core.img when using the %s filesystem on %s") \
+ % (self.stage1_device.name, self.stage2_device.format.type, self.stage2_device.type)
+ log.error(msg)
+ self.errors.append(msg)
+ ret = False
+ break
- # If the first partition starts too low show an error.
- parts = stage1dev.format.partedDisk.partitions
- for p in parts:
- start = p.geometry.start * p.disk.device.sectorSize
- if not p.getFlag(PARTITION_BIOS_GRUB) and start < 1024*512:
- msg = _("%s may not have enough space for grub2 to embed "
- "core.img when using the %s filesystem on %s") \
- % (stage1dev.name, stage2dev.format.type, stage2dev.type)
- log.error(msg)
- self.errors.append(msg)
- ret = False
- break
return ret
class EFIGRUB(GRUB2):
--
1.7.11.2
11 years, 5 months
APPEAL FOR URGENT BUSINESS ASSISTANCE
by diloem21@att.net
>From Miss Jana Loefah
Abidjan, Ivory Coast West Africa.
APPEAL FOR URGENT BUSINESS ASSISTANCE
Hello Dearest,
It is my desire to have business relationship with you. I contacted you after going through your profile,I prayed over it and selected your name among other names due to its esteeming nature and the recommendations given to me as a reputable and trust worthy person that I can do business with and by the recommendation , I must not hesitate to confide in you for this simple and sincere business .
My full name is Miss Jana Loefah the only duagther of late Mr. and Mrs.Joseph Loefah. My father was a very wealthy international businessman and cocoa merchant in Abidjan, the economic capital of Ivory coast, my father was poisoned to death by his business associates on one of their outings on a business trip . My mother died when I was a baby and since then my father took me so special. Before his death in a private hospital here in Abidjan he secretly called me on his bed side and told me that he has the sum of One million, five hundred thousand United State Dollars. USD ($1,500,000.00) left in fixed / suspense account in one of the prime bank here in Abidjan ,that he used my name as his only daugther for the next of Kin in depositing of the fund. He also explained to me that it was because of this wealth that he was poisoned by his business ssociates That I should seek for a foreign partner in a country of my choice where i will transfer this money and use it for investment purpose such as real estate management or hotel management .
Dear, I am honourably seeking your assistance in the following ways:
(1) To provide a new empty bank account into which this money would be transferred to if you dont want us to use your personal account .
(2) To serve as a guardian of this fund since i'm still a little girl.
(3) To make arrangement for me to come over to your country to further my education and to secure a resident permit in your country.
Moreover, Dear, i am willing to offer you 15% of the total sum as compensation for your effort/input after the successful transfer of this fund into your nominated account overseas. Furthermore, you indicate your options towards assisting me as I believe that this transaction would be concluded within four (4) days you signify interest to assist me. Anticipating to hear from you soon.
Sincerely
Miss Jana Loefah
11 years, 5 months
[PATCH] Catch OverflowError in manual partitioning.
by Samantha N. Bueno
Instead of crashing, inform users they should use integer values when
entering partition sizes.
---
pyanaconda/ui/gui/spokes/custom.py | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/pyanaconda/ui/gui/spokes/custom.py
b/pyanaconda/ui/gui/spokes/custom.py
index 515a9a7..8622b1f 100644
--- a/pyanaconda/ui/gui/spokes/custom.py
+++ b/pyanaconda/ui/gui/spokes/custom.py
@@ -1629,6 +1629,13 @@ class CustomPartitioningSpoke(NormalSpoke,
StorageChecker):
_("Failed to add new device. Click for "
"details."))
self.window.show_all()
+ except OverflowError as e:
+ log.error("invalid size set for partition")
+ self._error = e
+ self.window.set_info(Gtk.MessageType.ERROR,
+ _("Invalid partition size set. Use a "
+ "valid integer."))
+ self.window.show_all()
self._devices = self.__storage.devices
self._do_refresh()
--
1.7.11.7
11 years, 5 months
[PATCH] Do not accept tabs in the keyboard layout test box (#897312).
by Chris Lumens
---
pyanaconda/ui/gui/spokes/keyboard.glade | 1 +
1 file changed, 1 insertion(+)
diff --git a/pyanaconda/ui/gui/spokes/keyboard.glade b/pyanaconda/ui/gui/spokes/keyboard.glade
index 8e22c16..5635a4b 100644
--- a/pyanaconda/ui/gui/spokes/keyboard.glade
+++ b/pyanaconda/ui/gui/spokes/keyboard.glade
@@ -423,6 +423,7 @@
<property name="can_focus">True</property>
<property name="border_width">6</property>
<property name="buffer">layoutTestBuffer</property>
+ <property name="accepts_tab">False</property>
</object>
</child>
</object>
--
1.7.11.2
11 years, 5 months
[rhel6-branch] always show reserved space in lvm dialog (#879667)
by Brian C. Lane
From: "Brian C. Lane" <bcl(a)redhat.com>
You may start out with no space in interactive mode, then change the
size, so the label needs to always be there.
---
iw/lvm_dialog_gui.py | 39 +++++++++++++++++++--------------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index e6f70e3..cd1e11b 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -1405,26 +1405,25 @@ class VolumeGroupEditor:
maintable.set_row_spacing(row, 0)
row = row + 1
- if self.vg.reservedSpace:
- maintable.attach(createAlignedLabel(_("Reserved Space:")),
- 0, 1, row, row + 1, gtk.EXPAND|gtk.FILL,
- gtk.SHRINK)
- lbox = gtk.HBox()
- self.reservedSpaceLabel = gtk.Label("")
- labelalign = gtk.Alignment()
- labelalign.set(1.0, 0.5, 0.0, 0.0)
- labelalign.add(self.reservedSpaceLabel)
- lbox.pack_start(labelalign, False, False)
- self.reservedPercentLabel = gtk.Label("")
- labelalign = gtk.Alignment()
- labelalign.set(1.0, 0.5, 0.0, 0.0)
- labelalign.add(self.reservedPercentLabel)
- lbox.pack_start(labelalign, False, False, padding=10)
-
- maintable.attach(lbox, 1, 2, row, row + 1, gtk.EXPAND|gtk.FILL,
- gtk.SHRINK)
- maintable.set_row_spacing(row, 0)
- row = row + 1
+ maintable.attach(createAlignedLabel(_("Reserved Space:")),
+ 0, 1, row, row + 1, gtk.EXPAND|gtk.FILL,
+ gtk.SHRINK)
+ lbox = gtk.HBox()
+ self.reservedSpaceLabel = gtk.Label("")
+ labelalign = gtk.Alignment()
+ labelalign.set(1.0, 0.5, 0.0, 0.0)
+ labelalign.add(self.reservedSpaceLabel)
+ lbox.pack_start(labelalign, False, False)
+ self.reservedPercentLabel = gtk.Label("")
+ labelalign = gtk.Alignment()
+ labelalign.set(1.0, 0.5, 0.0, 0.0)
+ labelalign.add(self.reservedPercentLabel)
+ lbox.pack_start(labelalign, False, False, padding=10)
+
+ maintable.attach(lbox, 1, 2, row, row + 1, gtk.EXPAND|gtk.FILL,
+ gtk.SHRINK)
+ maintable.set_row_spacing(row, 0)
+ row = row + 1
maintable.attach(createAlignedLabel(_("Free Space:")), 0, 1, row,
row + 1, gtk.EXPAND|gtk.FILL, gtk.SHRINK)
--
1.8.0
11 years, 5 months
[PATCH master] Wait for slower dhcp for payload setup and hostname setting (#873468)
by Radek Vykydal
Cases I tested:
(spoke is pre-hub network spoke)
Link has (slow) dhcp:
- connected in payload init, connected in spoke
- not connected in payload init, connected in spoke
- fixed by the patch
- not connected in payload init, not connected in spoke
- subcases: - wait for connection in spoke
- leave spoke while connecting
- fixed by the patch
Link does not have dhcp:
- configure static connection and leave spoke
---
anaconda | 3 +-
pyanaconda/network.py | 62 ++++++++++++++++++++++---------------
pyanaconda/packaging/__init__.py | 6 ++++
pyanaconda/ui/gui/spokes/network.py | 5 +++
4 files changed, 49 insertions(+), 27 deletions(-)
diff --git a/anaconda b/anaconda
index 35fb5ce..0789094 100755
--- a/anaconda
+++ b/anaconda
@@ -973,9 +973,8 @@ if __name__ == "__main__":
doRescue(anaconda.rescue_mount, ksdata, anaconda.platform)
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="AnaPayloadThread", target=payloadInitialize, args=(anaconda.storage, ksdata, anaconda.payload)))
- # TODO start dhcp in thread if we have no connection
- networkInitialize(ksdata)
atexit.register(exitHandler, ksdata.reboot, anaconda.storage)
diff --git a/pyanaconda/network.py b/pyanaconda/network.py
index dbdf5df..640cd70 100644
--- a/pyanaconda/network.py
+++ b/pyanaconda/network.py
@@ -486,28 +486,6 @@ def waitForDevicesActivation(devices):
return waited_devs_props.keys()
-# write out current configuration state and wait for NetworkManager
-# to bring the device up, watch NM state and return to the caller
-# once we have a state
-def waitForConnection():
- bus = dbus.SystemBus()
- nm = bus.get_object(isys.NM_SERVICE, isys.NM_MANAGER_PATH)
- props = dbus.Interface(nm, isys.DBUS_PROPS_IFACE)
-
- i = 0
- while i < CONNECTION_TIMEOUT:
- state = props.Get(isys.NM_SERVICE, "State")
- if nmIsConnected(state):
- return True
- i += 1
- time.sleep(1)
-
- state = props.Get(isys.NM_SERVICE, "State")
- if nmIsConnected(state):
- return True
-
- return False
-
# get a kernel cmdline string for dracut needed for access to storage host
def dracutSetupArgs(networkStorageDevice):
@@ -916,6 +894,38 @@ def writeNetworkConf(storage, ksdata, instClass):
disableNMForStorageDevices(storage)
autostartFCoEDevices(storage, ksdata)
+def wait_for_dhcp():
+ """If NM is in connecting state, wait for connection.
+ Return value: NM has got connection."""
+ bus = dbus.SystemBus()
+ nm = bus.get_object(isys.NM_SERVICE, isys.NM_MANAGER_PATH)
+ props = dbus.Interface(nm, isys.DBUS_PROPS_IFACE)
+ state = props.Get(isys.NM_SERVICE, "State")
+
+ if state == isys.NM_STATE_CONNECTING:
+ log.debug("waiting for connecting NM (dhcp?)")
+ else:
+ return False
+
+ i = 0
+ while (state == isys.NM_STATE_CONNECTING and
+ i < CONNECTION_TIMEOUT):
+ state = props.Get(isys.NM_SERVICE, "State")
+ if nmIsConnected(state):
+ log.debug("connected, waited %d seconds" % i)
+ return True
+ i += 1
+ time.sleep(1)
+
+ log.debug("not connected, waited %d of %d secs" % (i, CONNECTION_TIMEOUT))
+ return False
+
+def update_hostname(ksdata):
+ hostname = getHostname()
+ log.debug("updating hostname %s" % hostname)
+ nd = kickstartNetworkData(hostname=hostname)
+ ksdata.network.network.append(nd)
+
# networking initialization and ksdata object update
def networkInitialize(ksdata):
from pyanaconda.kickstart import NetworkData
@@ -925,6 +935,8 @@ def networkInitialize(ksdata):
createMissingDefaultIfcfgs()
if ksdata.network.hostname is None:
- hostname = getHostname()
- nd = kickstartNetworkData(hostname=hostname)
- ksdata.network.network.append(nd)
+ update_hostname(ksdata)
+
+ # auto default dhcp connection would be activated by NM service
+ if wait_for_dhcp():
+ update_hostname(ksdata)
diff --git a/pyanaconda/packaging/__init__.py b/pyanaconda/packaging/__init__.py
index 1186569..e9a5da1 100644
--- a/pyanaconda/packaging/__init__.py
+++ b/pyanaconda/packaging/__init__.py
@@ -658,6 +658,12 @@ def payloadInitialize(storage, ksdata, payload):
if storageThread:
storageThread.join()
+ # FIXME: condition for cases where we don't want network
+ # (set and use payload.needsNetwork ?)
+ networkThread = threadMgr.get("AnaNetworkThread")
+ if networkThread:
+ networkThread.join()
+
payload.setup(storage)
def show_groups(payload):
diff --git a/pyanaconda/ui/gui/spokes/network.py b/pyanaconda/ui/gui/spokes/network.py
index 002679c..687319c 100644
--- a/pyanaconda/ui/gui/spokes/network.py
+++ b/pyanaconda/ui/gui/spokes/network.py
@@ -61,6 +61,9 @@ _ = lambda x: gettext.ldgettext("anaconda", x)
N_ = lambda x: x
P_ = lambda x, y, z: gettext.ldngettext("anaconda", x, y, z)
+import logging
+log = logging.getLogger("anaconda")
+
# These are required for dbus API use we need because of
# NM_GI_BUGS: 767998, 773678
NM_SERVICE = "org.freedesktop.NetworkManager"
@@ -1051,6 +1054,7 @@ class NetworkStandaloneSpoke(StandaloneSpoke):
parent.add(self.network_control_box.vbox)
self._initially_available = self.completed
+ log.debug("network standalone spoke (init): completed: %s" % self._initially_available)
self._now_available = False
def apply(self):
@@ -1065,6 +1069,7 @@ class NetworkStandaloneSpoke(StandaloneSpoke):
self._now_available = self.completed
+ log.debug("network standalone spoke (apply) payload: %s completed: %s" % (self.payload.baseRepo, self._now_available))
if not self.payload.baseRepo and not self._initially_available and self._now_available:
from pyanaconda.packaging import payloadInitialize
from pyanaconda.threads import threadMgr, AnacondaThread
--
1.7.11.7
11 years, 5 months
[PATCH] fix a couple really annoying resize dialog bugs
by Chris Lumens
I've gone out on a limb here and changed the design of the resize dialog a
bit to get rid of the combos in the action column, replacing them with a
communal set of buttons in a toolbar underneath the view. Here's a picture:
http://clumens.fedorapeople.org/resize.png
The buttons will change sensitivity based upon whether the filesystem supports
shrinking. The button for the currently selected action will also be
insensitive (not shown, but the code is there). I have not changed any string
here either.
Problems:
(1) You can collapse the disks if you want, but you have to double click on the
disk header. Nothing else works via double click.
(2) Toolbar buttons do not get a keyboard accelerator. That's just how it is.
This will keep use of this dialog via keyboard annoying, but it was already a
bit of a pain so I've probably not made things worse.
- Chris
11 years, 5 months
[PATCH 1/5] Allow specifying whether the URL you've given is a mirrorlist or not (#868558).
by Chris Lumens
---
anaconda.spec.in | 2 +-
pyanaconda/packaging/yumpayload.py | 4 ++-
pyanaconda/ui/gui/spokes/source.glade | 59 ++++++++++++++++++++++++++---------
pyanaconda/ui/gui/spokes/source.py | 24 +++++++++++---
4 files changed, 68 insertions(+), 21 deletions(-)
diff --git a/anaconda.spec.in b/anaconda.spec.in
index 5320608..75a4797 100644
--- a/anaconda.spec.in
+++ b/anaconda.spec.in
@@ -26,7 +26,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%define intltoolver 0.31.2-3
%define libnlver 1.0
%define libselinuxver 1.6
-%define pykickstartver 1.99.21
+%define pykickstartver 1.99.22
%define rpmpythonver 4.2-0.61
%define slangver 2.0.6-2
%define yumver 3.4.3-32
diff --git a/pyanaconda/packaging/yumpayload.py b/pyanaconda/packaging/yumpayload.py
index b52fb67..de977a3 100644
--- a/pyanaconda/packaging/yumpayload.py
+++ b/pyanaconda/packaging/yumpayload.py
@@ -560,6 +560,7 @@ reposdir=%s
method = self.data.method
sslverify = True
url = None
+ mirrorlist = None
if method.method == "harddrive":
if method.biospart:
@@ -639,6 +640,7 @@ reposdir=%s
url = "file://" + path
elif method.method == "url":
url = method.url
+ mirrorlist = method.mirrorlist
sslverify = not (method.noverifyssl or flags.noverifyssl)
elif method.method == "cdrom" or (checkmount and not method.method):
# Did dracut leave the DVD or NFS mounted for us?
@@ -684,7 +686,7 @@ reposdir=%s
self._yumCacheDirHack()
try:
- self._addYumRepo(BASE_REPO_NAME, url,
+ self._addYumRepo(BASE_REPO_NAME, url, mirrorlist=mirrorlist,
proxyurl=method.proxy, sslverify=sslverify)
except MetadataError as e:
log.error("base repo (%s/%s) not valid -- removing it"
diff --git a/pyanaconda/ui/gui/spokes/source.glade b/pyanaconda/ui/gui/spokes/source.glade
index 8ff450f..5622cdd 100644
--- a/pyanaconda/ui/gui/spokes/source.glade
+++ b/pyanaconda/ui/gui/spokes/source.glade
@@ -704,9 +704,6 @@ TeXlive 2012 repository</col>
<property name="height">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
<packing>
<property name="expand">False</property>
@@ -1076,10 +1073,17 @@ TeXlive 2012 repository</col>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
- <object class="GtkBox" id="urlBox">
+ <object class="GtkGrid" id="urlBox">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">6</property>
+ <property name="row_spacing">6</property>
+ <property name="column_spacing">6</property>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <placeholder/>
+ </child>
<child>
<object class="GtkComboBoxText" id="protocolComboBox">
<property name="visible">True</property>
@@ -1095,37 +1099,64 @@ TeXlive 2012 repository</col>
<signal name="changed" handler="on_protocol_changed" swapped="no"/>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">0</property>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="urlEntry">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="hexpand">True</property>
<property name="invisible_char">●</property>
<property name="invisible_char_set">True</property>
</object>
<packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">1</property>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="proxyButton">
<property name="label" translatable="yes">_Proxy setup...</property>
+ <property name="use_action_appearance">False</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<signal name="clicked" handler="on_proxy_clicked" swapped="no"/>
</object>
<packing>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="position">2</property>
+ <property name="left_attach">2</property>
+ <property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="mirrorlistCheckbox">
+ <property name="label" translatable="yes">This URL refers to a _mirror.</property>
+ <property name="use_action_appearance">False</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="no_show_all">True</property>
+ <property name="hexpand">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">1</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
</object>
diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index f570700..0cb7ca8 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -466,6 +466,7 @@ class SourceSpoke(NormalSpoke):
return
elif self._http_active() or self._ftp_active():
url = self._urlEntry.get_text().strip()
+ mirrorlist = False
# If the user didn't fill in the URL entry, just return as if they
# selected nothing.
@@ -480,14 +481,23 @@ class SourceSpoke(NormalSpoke):
url = "ftp://" + url
elif self._protocolComboBox.get_active() == 1 and not url.startswith("http://"):
url = "http://" + url
+ mirrorlist = self._mirrorlistCheckbox.get_active()
elif self._protocolComboBox.get_active() == 2 and not url.startswith("https://"):
url = "https://" + url
+ mirrorlist = self._mirrorlistCheckbox.get_active()
- if old_source.method == "url" and old_source.url == url:
+ if old_source.method == "url" and \
+ ((not mirrorlist and old_source.url == url) or \
+ (mirrorlist and old_source.mirrorlist == url)):
return
self.data.method.method = "url"
- self.data.method.url = url
+ if mirrorlist:
+ self.data.method.mirrorlist = url
+ self.data.method.url = ""
+ else:
+ self.data.method.url = url
+ self.data.method.mirrorlist = ""
elif self._nfs_active():
url = self._urlEntry.get_text().strip()
@@ -573,7 +583,7 @@ class SourceSpoke(NormalSpoke):
elif self._error:
return _("Error setting up software source")
elif self.data.method.method == "url":
- return self.data.method.url
+ return self.data.method.url or self.data.method.mirrorlist
elif self.data.method.method == "nfs":
return _("NFS server %s") % self.data.method.server
elif self.data.method.method == "cdrom":
@@ -598,6 +608,8 @@ class SourceSpoke(NormalSpoke):
self._protocolComboBox = self.builder.get_object("protocolComboBox")
self._isoChooserButton = self.builder.get_object("isoChooserButton")
+ self._mirrorlistCheckbox = self.builder.get_object("mirrorlistCheckbox")
+
self._verifyIsoButton = self.builder.get_object("verifyIsoButton")
def initialize(self):
@@ -715,7 +727,7 @@ class SourceSpoke(NormalSpoke):
if self.data.method.method == "url":
self._networkButton.set_active(True)
- proto = self.data.method.url
+ proto = self.data.method.url or self.data.method.mirrorlist
if proto.startswith("http:"):
self._protocolComboBox.set_active(1)
l = 7
@@ -728,6 +740,7 @@ class SourceSpoke(NormalSpoke):
self._urlEntry.set_sensitive(True)
self._urlEntry.set_text(proto[l:])
+ self._mirrorlistCheckbox.set_active(bool(self.data.method.mirrorlist))
elif self.data.method.method == "nfs":
self._networkButton.set_active(True)
self._protocolComboBox.set_active(4)
@@ -860,7 +873,8 @@ class SourceSpoke(NormalSpoke):
# method that's not the mirror list, or an NFS method.
self._urlEntry.set_sensitive(self._http_active() or self._ftp_active() or self._nfs_active())
- # Only allow the proxy button to be clicked if a proxy makes sense for
+ # Only allow thse widgets to be shown if it makes sense for the
# the currently selected protocol.
proxyButton.set_sensitive(self._http_active() or self._mirror_active())
nfsOptsBox.set_visible(self._nfs_active())
+ self._mirrorlistCheckbox.set_visible(self._http_active())
--
1.7.11.2
11 years, 5 months
Fix iutil.execWithCapture() with fatal and non-zero exit
by Stef Walter
When iutil.execWithCapture() is called with fatal=True and the process
exits with a non-zero exit code a TypeError:
TypeError: cannot concatenate 'str' and 'NoneType' objects
on this line:
log.error ("Error running " + command + ": " + e.strerror)
The attached patches fix the problem and add a test for the issue.
When I ran all the tests (using 'make unittest' or 'sudo make unittest')
I got thousands of failures, so I just ran the one I added using:
cd tests/pyanaconda_test; PYTHONPATH=../../pyanaconda/:../:. python -m
unittest iutil_test.IutilTest
Cheers,
Stef
11 years, 5 months