summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglatzor@ubuntu.com <>2006-07-27 22:34:11 +0200
committerglatzor@ubuntu.com <>2006-07-27 22:34:11 +0200
commit7403f3888293e0c9ff544a218decaf6b428b2396 (patch)
tree91e1f7fb24c696b7eb409acaf0b6a5f8c43fa0df
parentc2a2f69a9a9ee1f45290b15e76f6098c4b28bd98 (diff)
parent2c1051ac180cfa72705b63c5080771b69dbeaca7 (diff)
downloadpython-apt-7403f3888293e0c9ff544a218decaf6b428b2396.tar.gz
* merge with mvo
* try to find a nice country name for custom mirrors * if available select a custom mirror in the combobox
-rw-r--r--SoftwareProperties/SoftwareProperties.py42
-rw-r--r--SoftwareProperties/aptsources.py55
-rw-r--r--UpdateManager/UpdateManager.py19
-rw-r--r--data/channels/Ubuntu.info.in2
-rw-r--r--data/glade/SoftwareProperties.glade2
-rw-r--r--debian/changelog10
6 files changed, 63 insertions, 67 deletions
diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py
index f7a40821..93028206 100644
--- a/SoftwareProperties/SoftwareProperties.py
+++ b/SoftwareProperties/SoftwareProperties.py
@@ -21,7 +21,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
# USA
-import pdb
+#import pdb
import sys
import apt
import apt_pkg
@@ -292,6 +292,7 @@ class SoftwareProperties(SimpleGladeApp):
self.combobox_server.set_model(server_store)
server_store.append([_("Main server"),
self.distro.main_server])
+ # TRANSLATORS: %s is a country
server_store.append([_("Server for %s") % gettext.dgettext("iso-3166",
self.distro.country).rstrip(),
self.distro.nearest_server])
@@ -299,7 +300,19 @@ class SoftwareProperties(SimpleGladeApp):
for server in self.distro.used_servers:
if not re.match(server, self.distro.main_server) and \
not re.match(server, self.distro.nearest_server):
- server_store.append(["%s" % server, server])
+ #FIXME: an ubuntu hack
+ i = server.find("http://")
+ l = server.find(".archive.ubuntu.com")
+ if i != -1 and l != -1:
+ country = server[i+7:l]
+ if self.distro.countries.has_key(country):
+ # TRANSLATORS: %s is a country
+ server_store.append([_("Server for %s") % \
+ gettext.dgettext("iso-3166",
+ self.distro.countries[country].rstrip()),
+ server])
+ else:
+ server_store.append(["%s" % server, server])
if len(self.distro.used_servers) > 1:
server_store.append([_("Custom servers"), None])
self.combobox_server.set_active(2)
@@ -307,6 +320,9 @@ class SoftwareProperties(SimpleGladeApp):
self.combobox_server.set_active(0)
elif self.distro.used_servers[0] == self.distro.nearest_server:
self.combobox_server.set_active(1)
+ elif len(self.distro.used_servers) == 1:
+ self.combobox_server.set_active(2)
+
else:
self.combobox_server.set_active(0)
@@ -440,6 +456,27 @@ class SoftwareProperties(SimpleGladeApp):
source.file)
self.modified_sourceslist()
+ def on_checkbutton_popcon_toggled(self, widget):
+ """ The user clicked on the popcon paritipcation button """
+ popcon = "/etc/popularity-contest.conf"
+ if widget.get_active():
+ new_value = "yes"
+ else:
+ new_value = "no"
+ if os.path.exists(popcon):
+ # read it
+ lines = open(popcon).read().split("\n")
+ for line in lines:
+ try:
+ (key,value) = line.split("=")
+ if key == "PARTICIPATE":
+ lines[lines.index(line)] = 'PARTICIPATE=\"%s"' % new_value
+ except ValueError:
+ continue
+ # write it
+ open(popcon,"w").write("\n".join(lines))
+
+
def open_file(self, file):
"""Show an confirmation for adding the channels of the specified file"""
dialog = dialog_add_sources_list.AddSourcesList(self.window_main,
@@ -1003,3 +1040,4 @@ class GtkCdromProgress(apt.progress.CdromProgress, SimpleGladeApp):
return True
return False
+
diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py
index c111e4ff..40b55dfa 100644
--- a/SoftwareProperties/aptsources.py
+++ b/SoftwareProperties/aptsources.py
@@ -30,7 +30,7 @@ import shutil
import time
import os.path
-import pdb
+#import pdb
from UpdateManager.Common.DistInfo import DistInfo
@@ -416,61 +416,8 @@ class SourceEntryMatcher:
for suite in dist.suites:
if suite.match_uri != None:
self.templates.append(suite)
-
- # FIXME: The specifications should go into the .info files
return
- # DEBIAN
- debian_comps = ["^main$","^contrib$","^non-free$","^non-US$"]
- debian_comps_descr = [_("Officially supported"),
- _("Contributed software"),
- _("Non-free software"),
- _("US export restricted software")
- ]
-
- # dists by name
- self.dist_list.append(self.MatchDist(".*debian.org/debian",
- "^sarge$",
- _("Debian 3.1 \"Sarge\""),
- debian_comps, debian_comps_descr))
- self.dist_list.append(self.MatchDist(".*debian.org/debian",
- "^woody$",
- _("Debian 3.0 \"Woody\""),
- debian_comps, debian_comps_descr))
- # securtiy
- self.dist_list.append(self.MatchDist(".*security.debian.org",
- "^stable.*$",
- _("Debian Stable Security Updates"),
- debian_comps, debian_comps_descr))
- # dists by status
- self.dist_list.append(self.MatchDist(".*debian.org/debian",
- "^stable$",
- _("Debian Stable"),
- debian_comps, debian_comps_descr))
- self.dist_list.append(self.MatchDist(".*debian.org/debian",
- "^testing$",
- _("Debian Testing"),
- debian_comps, debian_comps_descr))
- self.dist_list.append(self.MatchDist(".*debian.org/debian",
- "^unstable$",
- _("Debian Unstable \"Sid\""),
- debian_comps, debian_comps_descr))
-
- # non-us
- self.dist_list.append(self.MatchDist(".*debian.org/debian-non-US",
- "^stable.*$",
- _("Debian Non-US (Stable)"),
- debian_comps, debian_comps_descr))
- self.dist_list.append(self.MatchDist(".*debian.org/debian-non-US",
- "^testing.*$",
- _("Debian Non-US (Testing)"),
- debian_comps, debian_comps_descr))
- self.dist_list.append(self.MatchDist(".*debian.org/debian-non-US",
- "^unstable.*$",
- _("Debian Non-US (Unstable)"),
- debian_comps, debian_comps_descr,
- SOURCE_SYSTEM))
-
def match(self, source):
"""Add a matching template to the source"""
_ = gettext.gettext
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index d4cc7a59..109e4d0c 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -83,11 +83,19 @@ CHANGELOGS_URI="http://changelogs.ubuntu.com/changelogs/pool/%s/%s/%s/%s_%s/chan
class MyCache(apt.Cache):
def __init__(self, progress):
apt.Cache.__init__(self, progress)
+ self._initDepCache()
assert self._depcache.BrokenCount == 0 and self._depcache.DelCount == 0
self.all_changes = {}
+ def _initDepCache(self):
+ #apt_pkg.Config.Set("Debug::pkgPolicy","1")
+ #self.depcache = apt_pkg.GetDepCache(self.cache)
+ #self._depcache = apt_pkg.GetDepCache(self._cache)
+ self._depcache.ReadPinFile()
+ if os.path.exists(SYNAPTIC_PINFILE):
+ self._depcache.ReadPinFile(SYNAPTIC_PINFILE)
+ self._depcache.Init()
def clean(self):
- for pkg in self:
- pkg.markKeep()
+ self._initDepCache()
def saveDistUpgrade(self):
""" this functions mimics a upgrade but will never remove anything """
self._depcache.Upgrade(True)
@@ -755,13 +763,6 @@ class UpdateManager(SimpleGladeApp):
sys.exit(1)
else:
progress.hide()
- #apt_pkg.Config.Set("Debug::pkgPolicy","1")
- #self.depcache = apt_pkg.GetDepCache(self.cache)
- self.cache._depcache.ReadPinFile()
- if os.path.exists(SYNAPTIC_PINFILE):
- self.cache._depcache.ReadPinFile(SYNAPTIC_PINFILE)
- self.cache._depcache.Init()
-
def check_auto_update(self):
# Check if automatic update is enabled. If not show a dialog to inform
diff --git a/data/channels/Ubuntu.info.in b/data/channels/Ubuntu.info.in
index bac13754..f3eb60d6 100644
--- a/data/channels/Ubuntu.info.in
+++ b/data/channels/Ubuntu.info.in
@@ -110,7 +110,7 @@ BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu/
_Description: Backported updates
-Suite: dapper-backports
+Suite: breezy
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu/
diff --git a/data/glade/SoftwareProperties.glade b/data/glade/SoftwareProperties.glade
index 08ffd743..98bf65bc 100644
--- a/data/glade/SoftwareProperties.glade
+++ b/data/glade/SoftwareProperties.glade
@@ -1057,7 +1057,7 @@
<child>
<widget class="GtkLabel" id="label20">
<property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;Please take part in the popularity contest, to improve the user experience of Ubuntu. Therefor the following data will be collected and sent to the Ubuntu project anonymously on a weekly basis: the list of installed software and how often it was used.
+ <property name="label" translatable="yes">&lt;i&gt;To improve the user experience of Ubuntu please take part in the popularity contest. If you do so the list of installed software and how often it was used will be collected and sent anonymously to the Ubuntu project on a weekly basis.
The results are used to improve the support for popular applications and to rank applications in the search results.&lt;/i&gt;</property>
<property name="use_underline">False</property>
diff --git a/debian/changelog b/debian/changelog
index 31679a80..55cb82bc 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+update-manager (0.43) edgy; urgency=low
+
+ * fixes in the changelog reading code
+ * speedup in the cache clear code
+ * runs as user by default now
+ * uses dbus to implement singleton behaviour
+ * updated the software-properties code to know about edgy
+
+ -- Michael Vogt <michael.vogt@ubuntu.com> Tue, 4 Jul 2006 11:16:31 +0200
+
update-manager (0.42.2ubuntu22) dapper; urgency=low
* UpdateManager/UpdateManager.py: