summaryrefslogtreecommitdiff
path: root/SoftwareProperties
diff options
context:
space:
mode:
Diffstat (limited to 'SoftwareProperties')
-rw-r--r--SoftwareProperties/SoftwareProperties.py1
-rw-r--r--SoftwareProperties/aptsources.py8
2 files changed, 8 insertions, 1 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index d920b693..f9af3a58 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -366,6 +366,7 @@ class SoftwareProperties(SimpleGladeApp):
# FIXME: ugly
if not "security.ubuntu.com" in source.uri:
source.uri = uri_selected
+ self.distro.ddefault_server = uri_selected
self.modified_sourceslist()
def on_component_toggled(self, checkbutton, comp):
diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py
index 7418a7cb..c111e4ff 100644
--- a/SoftwareProperties/aptsources.py
+++ b/SoftwareProperties/aptsources.py
@@ -535,6 +535,7 @@ class Distribution:
self.source_code_sources = []
# location of the sources
+ self.default_server = ""
self.main_server = ""
self.nearest_server = ""
self.used_servers = []
@@ -623,6 +624,11 @@ class Distribution:
# seems to be a network source
self.used_servers.append(medium)
+ if len(self.main_sources) == 0:
+ self.default_server = self.main_server
+ else:
+ self.default_server = self.main_sources[0].uri
+
def add_source(self, sources_list, type=None,
uri=None, dist=None, comps=None, comment=""):
"""
@@ -630,7 +636,7 @@ class Distribution:
"""
if uri == None:
# FIXME: Add support for the server selector
- uri = self.main_server
+ uri = self.default_server
if dist == None:
dist = self.codename
if comps == None: