summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2006-09-11 20:07:54 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2006-09-11 20:07:54 +0200
commit6d61faf23c3ca83eba9e2bec999cf9d41ab95f3f (patch)
tree73ca929e84fcc183ae74f1cd434cff39c8be170d
parent6021ed9fbb44bafbe2b7540f2f79226909e4672d (diff)
parentcb5c5cca3e6d5b90018a2dc49b77d61dede3628c (diff)
downloadpython-apt-6d61faf23c3ca83eba9e2bec999cf9d41ab95f3f.tar.gz
* merged from glatzor
-rw-r--r--UpdateManager/UpdateManager.py17
-rw-r--r--data/channels/Ubuntu.info14
2 files changed, 27 insertions, 4 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py
index 585bdef9..b9ce315c 100644
--- a/UpdateManager/UpdateManager.py
+++ b/UpdateManager/UpdateManager.py
@@ -248,11 +248,14 @@ class UpdateList:
# sort by origin
for pkg in cache:
- if pkg.markedUpgrade or pkg.markedInstall or pkg.isUpgradable:
+ if pkg.isUpgradable:
if pkg.candidateOrigin == None:
# can happen for e.g. loged packages
+ # FIXME: do something more sensible here (but what?)
print "WARNING: upgradable but no canidateOrigin?!?: ", pkg.name
continue
+ # TRANSLATORS: updates from an 'unknown' origin
+ originstr = _("Other updates")
for aorigin in pkg.candidateOrigin:
archive = aorigin.archive
origin = aorigin.origin
@@ -264,7 +267,7 @@ class UpdateList:
self.pkgs[origin_node] = []
self.pkgs[origin_node].append(pkg)
self.num_updates = self.num_updates + 1
- if pkg.isUpgradable:
+ if pkg.isUpgradable and not (pkg.markedUpgrade or pkg.markedInstall):
self.held_back.append(pkg.name)
for l in self.pkgs.keys():
self.pkgs[l].sort(lambda x,y: cmp(x.name,y.name))
@@ -394,7 +397,9 @@ class UpdateManager(SimpleGladeApp):
renderer.set_property("active", to_install)
if pkg.name in self.list.held_back:
renderer.set_property("activatable", False)
-
+ else:
+ renderer.set_property("activatable", True)
+
def package_column_view_func(self, cell_layout, renderer, model, iter):
self.header_column_func(cell_layout, renderer, model, iter)
@@ -732,9 +737,13 @@ class UpdateManager(SimpleGladeApp):
def toggled(self, renderer, path):
""" a toggle button in the listview was toggled """
- self.setBusy(True)
iter = self.store.get_iter(path)
pkg = self.store.get_value(iter, LIST_PKG)
+ # make sure that we don't allow to toggle deactivated updates
+ # this is needed for the call by the row activation callback
+ if pkg.name in self.list.held_back:
+ return False
+ self.setBusy(True)
# update the cache
if pkg.markedInstall or pkg.markedUpgrade:
pkg.markKeep()
diff --git a/data/channels/Ubuntu.info b/data/channels/Ubuntu.info
index 93ec83d2..379da07d 100644
--- a/data/channels/Ubuntu.info
+++ b/data/channels/Ubuntu.info
@@ -40,6 +40,7 @@ ParentSuite: edgy
RepositoryType: deb
BaseURI: http://security.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Important security updates
Suite: edgy-updates
@@ -47,6 +48,7 @@ ParentSuite: edgy
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Recommended updates
Suite: edgy-proposed
@@ -54,6 +56,7 @@ ParentSuite: edgy
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Proposed updates
Suite: edgy-backports
@@ -61,6 +64,7 @@ ParentSuite: edgy
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Backported updates
Suite: dapper
@@ -103,6 +107,7 @@ ParentSuite: dapper
RepositoryType: deb
BaseURI: http://security.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Important security updates
Suite: dapper-updates
@@ -110,6 +115,7 @@ ParentSuite: dapper
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Recommended updates
Suite: dapper-proposed
@@ -117,6 +123,7 @@ ParentSuite: dapper
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Proposed updates
Suite: dapper-backports
@@ -124,6 +131,7 @@ ParentSuite: dapper
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Backported updates
Suite: breezy
@@ -162,6 +170,7 @@ ParentSuite: breezy
RepositoryType: deb
BaseURI: http://security.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Ubuntu 5.10 Security Updates
Suite: breezy-updates
@@ -169,6 +178,7 @@ ParentSuite: breezy
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Ubuntu 5.10 Updates
Suite: breezy-backports
@@ -176,6 +186,7 @@ ParentSuite: breezy
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Ubuntu 5.10 Backports
Suite: hoary
@@ -214,6 +225,7 @@ ParentSuite: hoary
RepositoryType: deb
BaseURI: http://security.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu|security.ubuntu.com
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Ubuntu 5.04 Security Updates
Suite: hoary-updates
@@ -221,6 +233,7 @@ ParentSuite: hoary
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Ubuntu 5.04 Updates
Suite: hoary-backports
@@ -228,6 +241,7 @@ ParentSuite: hoary
RepositoryType: deb
BaseURI: http://archive.ubuntu.com/ubuntu/
MatchURI: archive.ubuntu.com/ubuntu
+MirrorsFile: /usr/share/update-manager/mirrors.cfg
Description: Ubuntu 5.04 Backports
Suite: warty