---
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