From 672afa8a5ebd29d89492cdb36a34cd791a3f4ada Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 3 Apr 2006 17:49:38 +0200 Subject: * when runing gpg, protect it with try: except: --- UpdateManager/DistUpgradeFetcher.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index c6b83994..794566c2 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -114,7 +114,11 @@ class DistUpgradeFetcher(object): proc = gpg.run(['--verify', signature, file], create_fhs=['status','logger','stderr']) gpgres = proc.handles['status'].read() - proc.wait() + try: + proc.wait() + except IOError: + # gnupg returned a problem (non-zero exit) + return False if "VALIDSIG" in gpgres: return True return False -- cgit v1.2.3 From de12422fe0c52d11a9bec73aea2f92621302c6ae Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 14:39:09 +0200 Subject: * added better error reporting for the DistUpgradeFetcher --- UpdateManager/Common/utils.py | 12 ++++++++++++ UpdateManager/DistUpgradeFetcher.py | 23 +++++++++++++++++------ 2 files changed, 29 insertions(+), 6 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/Common/utils.py b/UpdateManager/Common/utils.py index ffafadfb..17c62212 100644 --- a/UpdateManager/Common/utils.py +++ b/UpdateManager/Common/utils.py @@ -1,3 +1,4 @@ +import gtk def str_to_bool(str): if str == "0" or str.upper() == "FALSE": @@ -7,3 +8,14 @@ def str_to_bool(str): def utf8(str): return unicode(str, 'latin1').encode('utf-8') + +def error(parent, summary, message): + d = gtk.MessageDialog(parent=parent, + flags=gtk.DIALOG_MODAL, + type=gtk.MESSAGE_ERROR, + buttons=gtk.BUTTONS_CLOSE) + d.set_markup("%s\n\n%s" % (summary, message)) + d.set_title("") + res = d.run() + d.destroy() + return diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 794566c2..bfc51f44 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -33,7 +33,7 @@ from gettext import gettext as _ import GtkProgress from ReleaseNotesViewer import ReleaseNotesViewer - +from Common.utils import * class DistUpgradeFetcher(object): @@ -196,22 +196,33 @@ class DistUpgradeFetcher(object): if not self.showReleaseNotes(): return if not self.fetchDistUpgrader(): - print "Fetch failed" + error("Failed to fetch", + "Fetching the upgrade failed. There may be a network " + "problem. ") return if not self.extractDistUpgrader(): - print "extract failed" + error("Failed to extract", + "Extracting the upgrade failed. There may be a problem " + "with the network or with the server. ") + return if not self.verifyDistUprader(): - print "verify failed" + error("Verfication failed", + "Verfing the upgrade failed. There may be a problem " + "with the network or with the server. ") self.cleanup() return if not self.authenticate(): - print "authenticate failed" + error("Authentication failed", + "Authenticating the upgrade failed. There may be a problem " + "with the network or with the server. ") self.cleanup() return self.runDistUpgrader() if __name__ == "__main__": - d = DistUpgradeFetcher(None) + error(None, "summary","message") + d = DistUpgradeFetcher(None,None) print d.authenticate('/tmp/Release','/tmp/Release.gpg') + -- cgit v1.2.3 From 4b46ffefe03f0ca2964767bfc02a59288eb56ffa Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 14:46:14 +0200 Subject: * marked some missing strings with _() --- UpdateManager/DistUpgradeFetcher.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index bfc51f44..d81bab11 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -196,26 +196,26 @@ class DistUpgradeFetcher(object): if not self.showReleaseNotes(): return if not self.fetchDistUpgrader(): - error("Failed to fetch", - "Fetching the upgrade failed. There may be a network " - "problem. ") + error(_("Failed to fetch"), + _("Fetching the upgrade failed. There may be a network " + "problem. ")) return if not self.extractDistUpgrader(): - error("Failed to extract", - "Extracting the upgrade failed. There may be a problem " - "with the network or with the server. ") + error(_("Failed to extract"), + _("Extracting the upgrade failed. There may be a problem " + "with the network or with the server. ")) return if not self.verifyDistUprader(): - error("Verfication failed", + error(_("Verfication failed"), "Verfing the upgrade failed. There may be a problem " - "with the network or with the server. ") + "with the network or with the server. ")) self.cleanup() return if not self.authenticate(): - error("Authentication failed", + error(_("Authentication failed"), "Authenticating the upgrade failed. There may be a problem " - "with the network or with the server. ") + "with the network or with the server. ")) self.cleanup() return self.runDistUpgrader() -- cgit v1.2.3 From cfdf56d0896513feaf59e91146feb875f852b4e5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 14:57:48 +0200 Subject: * syntax error fix --- UpdateManager/DistUpgradeFetcher.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index d81bab11..e9347f7c 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -208,14 +208,14 @@ class DistUpgradeFetcher(object): return if not self.verifyDistUprader(): error(_("Verfication failed"), - "Verfing the upgrade failed. There may be a problem " - "with the network or with the server. ")) + _("Verfing the upgrade failed. There may be a problem " + "with the network or with the server. ")) self.cleanup() return if not self.authenticate(): error(_("Authentication failed"), - "Authenticating the upgrade failed. There may be a problem " - "with the network or with the server. ")) + _("Authenticating the upgrade failed. There may be a problem " + "with the network or with the server. ")) self.cleanup() return self.runDistUpgrader() -- cgit v1.2.3 From 07a81be80123030941e9eacc7f3b78f73e9571f2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 15:01:00 +0200 Subject: * if we have no release notes, return true from showRelease notes --- UpdateManager/DistUpgradeFetcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index e9347f7c..131fd28e 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -90,7 +90,7 @@ class DistUpgradeFetcher(object): # user clicked cancel if res == gtk.RESPONSE_CANCEL: return False - return True + return True def authenticate(self): if self.new_dist.upgradeToolSig: -- cgit v1.2.3 From eb706ccd2c2b6458777d26025ac7db1efd1c294c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 15:03:23 +0200 Subject: * give a proper parent for the dist-ugprade-fetcher error window --- UpdateManager/DistUpgradeFetcher.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 131fd28e..c4c42e8e 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -196,24 +196,28 @@ class DistUpgradeFetcher(object): if not self.showReleaseNotes(): return if not self.fetchDistUpgrader(): - error(_("Failed to fetch"), + error(self.parent, + _("Failed to fetch"), _("Fetching the upgrade failed. There may be a network " "problem. ")) return if not self.extractDistUpgrader(): - error(_("Failed to extract"), + error(self.parent, + _("Failed to extract"), _("Extracting the upgrade failed. There may be a problem " "with the network or with the server. ")) return if not self.verifyDistUprader(): - error(_("Verfication failed"), + error(self.parent, + _("Verfication failed"), _("Verfing the upgrade failed. There may be a problem " "with the network or with the server. ")) self.cleanup() return if not self.authenticate(): - error(_("Authentication failed"), + error(self.parent, + _("Authentication failed"), _("Authenticating the upgrade failed. There may be a problem " "with the network or with the server. ")) self.cleanup() -- cgit v1.2.3 From 3fa5e46cb1975e47065a584eb1d2e00bf03af651 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 15:11:01 +0200 Subject: * indent fix --- UpdateManager/DistUpgradeFetcher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index c4c42e8e..1ddc7bca 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -90,7 +90,7 @@ class DistUpgradeFetcher(object): # user clicked cancel if res == gtk.RESPONSE_CANCEL: return False - return True + return True def authenticate(self): if self.new_dist.upgradeToolSig: -- cgit v1.2.3 From 0813eea814baa4f041d3cac07a4a7070cd61cd7c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 15:17:22 +0200 Subject: * improved the error reporting (again) --- UpdateManager/DistUpgradeFetcher.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 1ddc7bca..54823795 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -116,11 +116,14 @@ class DistUpgradeFetcher(object): gpgres = proc.handles['status'].read() try: proc.wait() - except IOError: + except IOError,e: # gnupg returned a problem (non-zero exit) + print "exception from gpg: %s", e return False if "VALIDSIG" in gpgres: return True + print "invalid result from gpg:" + print gpgres return False def extractDistUpgrader(self): @@ -196,27 +199,27 @@ class DistUpgradeFetcher(object): if not self.showReleaseNotes(): return if not self.fetchDistUpgrader(): - error(self.parent, + error(self.window_main, _("Failed to fetch"), _("Fetching the upgrade failed. There may be a network " "problem. ")) return if not self.extractDistUpgrader(): - error(self.parent, + error(self.window_main, _("Failed to extract"), _("Extracting the upgrade failed. There may be a problem " "with the network or with the server. ")) return if not self.verifyDistUprader(): - error(self.parent, + error(self.window_main, _("Verfication failed"), _("Verfing the upgrade failed. There may be a problem " "with the network or with the server. ")) self.cleanup() return if not self.authenticate(): - error(self.parent, + error(self.window_main, _("Authentication failed"), _("Authenticating the upgrade failed. There may be a problem " "with the network or with the server. ")) -- cgit v1.2.3 From 5f87a4cb3ff6f83519dd2680879e921a58a4b16c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 15:31:55 +0200 Subject: * fix the authentication --- UpdateManager/DistUpgradeFetcher.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 54823795..aa51066a 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -104,12 +104,16 @@ class DistUpgradeFetcher(object): # mandatory return True - def gpgauthenticate(self, file, signature, keyring='/etc/apt/trusted.gpg'): + def gpgauthenticate(self, file, signature, + keyring='/etc/apt/trusted.gpg', + trustdb='/etc/apt/trustdb.gpg'): """ authenticated a file against a given signature, if no keyring is given use the apt default keyring """ gpg = GnuPGInterface.GnuPG() - gpg.options.extra_args = ['--no-default-keyring', + gpg.options.extra_args = ['--no-options', + '--no-default-keyring', + '--trustdb-name',trustdb, '--keyring', keyring] proc = gpg.run(['--verify', signature, file], create_fhs=['status','logger','stderr']) @@ -118,7 +122,7 @@ class DistUpgradeFetcher(object): proc.wait() except IOError,e: # gnupg returned a problem (non-zero exit) - print "exception from gpg: %s", e + print "exception from gpg: %s" % e return False if "VALIDSIG" in gpgres: return True -- cgit v1.2.3 From 681625e65d2f2b543da92a42a52f90f2ab3b1ef2 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Apr 2006 17:02:45 +0200 Subject: * janis fake gconf patch added --- UpdateManager/UpdateManager.py | 5 ++++- UpdateManager/fakegconf.py | 24 ++++++++++++++++++++++++ debian/changelog | 2 ++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 UpdateManager/fakegconf.py (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index bdbfc20f..bad5af88 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -28,7 +28,10 @@ pygtk.require('2.0') import gtk import gtk.gdk import gtk.glade -import gconf +try: + import gconf +except: + import fakegconf as gconf import gobject import apt import apt_pkg diff --git a/UpdateManager/fakegconf.py b/UpdateManager/fakegconf.py new file mode 100644 index 00000000..fd465fa3 --- /dev/null +++ b/UpdateManager/fakegconf.py @@ -0,0 +1,24 @@ +# This is a class which contains stubs for the gconf methods +# used in Update Manager. When gconf is unavailable it will +# still work but not retain the user settings. + +class FakeGconf: + + def get_bool(self, key): + return False + + def set_bool(self, key,value): + pass + + def get_pair(self, key, ta = None, tb = None): + return [300,300] + + def set_pair(self, key, ta, tb, a, b): + pass + +VALUE_INT = "" + +def client_get_default(): + return FakeGconf() + + diff --git a/debian/changelog b/debian/changelog index f5132e2e..6a05035c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ update-manager (0.42.2ubuntu10) dapper; urgency=low * correct dapper version number (#36136) * keybindings fixed (#36116) * calc the update before downloading the changelog (#36140) + * add a fake gconf interface for xubuntu (nop for normal ubuntu) + (Thanks to Jani Monoses for the patch) -- -- cgit v1.2.3 From 99e04876f2b3eb1c6d9150ad0ac17ad8fc1f7e97 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 5 Apr 2006 14:48:32 +0200 Subject: * merged the patch from Jani for fakegconf --- UpdateManager/fakegconf.py | 61 ++++++++++++++++++++++++++++++++++++++++------ debian/changelog | 7 ++++-- debian/control | 3 ++- 3 files changed, 60 insertions(+), 11 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/fakegconf.py b/UpdateManager/fakegconf.py index fd465fa3..7e387b56 100644 --- a/UpdateManager/fakegconf.py +++ b/UpdateManager/fakegconf.py @@ -1,24 +1,69 @@ -# This is a class which contains stubs for the gconf methods -# used in Update Manager. When gconf is unavailable it will -# still work but not retain the user settings. +# Copyright (c) 2006 Jani Monoses + +# This is a class which handles settings when the gconf library +# is unavailable such as in a non-Gnome environment +# The configuration is stored in python hash format which is sourced +# at program start and dumped at exit + +import string +import atexit + +CONFIG_FILE="/root/.update-manager-conf" class FakeGconf: + + def __init__(self): + self.config = {} + try: + #execute python file which contains the dictionary called config + exec open (CONFIG_FILE) + self.config = config + except: + pass + #only get the 'basename' from the gconf key + def keyname(self, key): + return string.rsplit(key, '/', 1)[-1] + def get_bool(self, key): - return False + key = self.keyname(key) + return self.config.setdefault(self.keyname(key), True) def set_bool(self, key,value): - pass + key = self.keyname(key) + self.config[key] = value + # FIXME assume type is int for now def get_pair(self, key, ta = None, tb = None): - return [300,300] + key = self.keyname(key) + return self.config.setdefault(self.keyname(key), [400, 500]) + # FIXME assume type is int for now def set_pair(self, key, ta, tb, a, b): - pass + key = self.keyname(key) + self.config[key] = [a, b] + + #Save current dictionary to config file + def save(self): + file = open(CONFIG_FILE, "w") + data = "config = {" + for i in self.config: + data += "'"+i+"'" + ":" + str(self.config[i])+",\n" + data += "}" + file.write(data) + file.close() + VALUE_INT = "" +fakegconf = FakeGconf() + def client_get_default(): - return FakeGconf() + return fakegconf + +def fakegconf_atexit(): + fakegconf.save() + +atexit.register(fakegconf_atexit) diff --git a/debian/changelog b/debian/changelog index f9b39c53..236841b7 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,8 +1,11 @@ update-manager (0.42.2ubuntu11) dapper; urgency=low - * debian/control: depend on unattended-upgrades + * debian/control: + - depend on unattended-upgrades + - move python-gnome2 to recommends (we only use gconf from it) + * UpdateManager/fakegconf.py: update for xubuntu (thanks to Jani Monoses) - -- Michael Vogt Tue, 4 Apr 2006 21:47:05 +0200 + -- Michael Vogt Wed, 5 Apr 2006 14:46:10 +0200 update-manager (0.42.2ubuntu10) dapper; urgency=low diff --git a/debian/control b/debian/control index 97f0d3dc..691eba0c 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,8 @@ Standards-Version: 3.6.1.1 Package: update-manager Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, python, python-gnome2, python-glade2, python-apt (>= 0.6.15), synaptic (>= 0.57.8), lsb-release, python-gnupginterface, unattended-upgrades +Depends: ${python:Depends}, ${misc:Depends}, python, python-glade2, python-apt (>= 0.6.15), synaptic (>= 0.57.8), lsb-release, python-gnupginterface, unattended-upgrades +Recommends: python-gnome2 Description: GNOME application that manages apt updates This is the GNOME apt update manager. It checks for updates and lets the user choose which to install. -- cgit v1.2.3 From b407ce2b2312e82f98d54657b0ca978b9cad4964 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 5 Apr 2006 17:44:50 +0200 Subject: * add "--devel-release" as option --- UpdateManager/MetaRelease.py | 2 +- UpdateManager/UpdateManager.py | 5 ++++- update-manager | 14 +++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/MetaRelease.py b/UpdateManager/MetaRelease.py index fde705bb..0cfb9f36 100644 --- a/UpdateManager/MetaRelease.py +++ b/UpdateManager/MetaRelease.py @@ -44,7 +44,7 @@ class MetaRelease(gobject.GObject): # some constants METARELEASE_URI = "http://changelogs.ubuntu.com/meta-release" - #METARELEASE_URI = "http://people.ubuntu.com/~mvo/dist-upgrader/meta-release-test2" + METARELEASE_URI_UNSTABLE = "http://changelogs.ubuntu.com/meta-release-development" METARELEASE_FILE = "/var/lib/update-manager/meta-release" __gsignals__ = { diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index bad5af88..93f17a3d 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -738,8 +738,11 @@ class UpdateManager(SimpleGladeApp): self.on_button_reload_clicked(None) - def main(self): + def main(self, options): self.meta = MetaRelease() + # the user wants to see the development release + if options.devel_release: + self.meta.METARELEASE_URI = self.meta.METARELEASE_URI_UNSTABLE self.meta.connect("new_dist_available",self.new_dist_available) self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported) diff --git a/update-manager b/update-manager index 04005c74..6c1f3fd0 100644 --- a/update-manager +++ b/update-manager @@ -33,7 +33,10 @@ from UpdateManager.UpdateManager import UpdateManager import gettext from gettext import gettext as _ +from optparse import OptionParser + if __name__ == "__main__": + _ = gettext.gettext APP="update-manager" DIR="/usr/share/locale" @@ -43,6 +46,15 @@ if __name__ == "__main__": gtk.glade.bindtextdomain(APP, DIR) gtk.glade.textdomain(APP) + # Begin parsing of options + parser = OptionParser() + parser.add_option ("-d", "--devel-release", action="store_true", + dest="devel_release", default=False, + help="Check if upgrading to the latest devel release " + "is possible") + + (options, args) = parser.parse_args() + if os.geteuid() != 0: dialog = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, _("You need to be root to run this program")) @@ -53,4 +65,4 @@ if __name__ == "__main__": data_dir="/usr/share/update-manager/" #data_dir="/tmp/xxx/share/update-manager/" app = UpdateManager(data_dir) - app.main() + app.main(options) -- cgit v1.2.3 From 1a119e404b4f5bc69d892a2cda4227c6e45af831 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Mon, 10 Apr 2006 12:01:56 +0200 Subject: * fix the help string in update-manager (ubuntu: #23274) --- UpdateManager/UpdateManager.py | 2 +- debian/changelog | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 93f17a3d..42982de4 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -182,7 +182,7 @@ class UpdateList: msg = ("%s\n\n%s" % \ (_("Cannot install all available updates"), _("Some updates require the removal of further software. " - "Use the function \"Smart Upgrade\" of the package manager " + "Use the function \"Mark All Upgrades\" of the package manager " "\"Synaptic\" or run \"sudo apt-get dist-upgrade\" in a " "terminal to update your system completely."))) dialog = gtk.MessageDialog(self.parent_window, 0, gtk.MESSAGE_INFO, diff --git a/debian/changelog b/debian/changelog index 08179c32..4afd08a0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ update-manager (0.42.2ubuntu12) dapper; urgency=low * channels/*.in: typo fix * po/POTFILES.in: add missing files (ubuntu: #38738) + * fix the help string in update-manager (ubuntu: #23274) -- -- cgit v1.2.3 From c5279cfbb9ad48c9d95e535734f311d7c9d98818 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Apr 2006 20:11:08 +0200 Subject: * make it not check for new distro releases anymore for dapper --- UpdateManager/MetaRelease.py | 4 +++- UpdateManager/UpdateManager.py | 15 +++++++++------ data/update-manager.schemas.in | 16 ++++++++++++++++ debian/changelog | 2 ++ update-manager | 3 +++ 5 files changed, 33 insertions(+), 7 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/MetaRelease.py b/UpdateManager/MetaRelease.py index 0cfb9f36..b655f36a 100644 --- a/UpdateManager/MetaRelease.py +++ b/UpdateManager/MetaRelease.py @@ -57,8 +57,10 @@ class MetaRelease(gobject.GObject): } - def __init__(self): + def __init__(self, useDevelopmentRelase=False): gobject.GObject.__init__(self) + if useDevelopmentRelase: + self.METARELEASE_URI = self.METARELEASE_URI_UNSTABLE self.metarelease_information = None self.downloading = True # we start the download thread here and we have a timeout diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 42982de4..5773c5a6 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -739,12 +739,15 @@ class UpdateManager(SimpleGladeApp): def main(self, options): - self.meta = MetaRelease() - # the user wants to see the development release - if options.devel_release: - self.meta.METARELEASE_URI = self.meta.METARELEASE_URI_UNSTABLE - self.meta.connect("new_dist_available",self.new_dist_available) - self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported) + # check if we are interessted in dist-upgrade information + # (we are not by default on dapper) + gconfclient = gconf.client_get_default() + if options.check_dist_upgrades or \ + gconfclient.get_bool("/apps/update-manager/check_dist_upgrades"): + # the user wants to see the development release + self.meta = MetaRelease(options.devel_release) + self.meta.connect("new_dist_available",self.new_dist_available) + self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported) while gtk.events_pending(): gtk.main_iteration() diff --git a/data/update-manager.schemas.in b/data/update-manager.schemas.in index 06308871..68a8deef 100644 --- a/data/update-manager.schemas.in +++ b/data/update-manager.schemas.in @@ -47,6 +47,22 @@ + + /schemas/apps/update-manager/check_dist_upgrades + /apps/update-manager/check_dist_upgrades + update-manager + bool + False + + + Remind to reload the channel list + + If automatic checking for updates is disabeld, you have + to reload the channel list manually. This option allows + to hide the reminder shown in this case. + + + diff --git a/debian/changelog b/debian/changelog index 303e46a2..d00f910b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -5,6 +5,8 @@ update-manager (0.42.2ubuntu12) dapper; urgency=low * fix the help string in update-manager (ubuntu: #23274) * fix the bad grammar in "Cannot install all available updates" (ubuntu: #32864) + * don't inform about new distro release on dapper by default (can be + changed via a gconf setting/commandline switch) -- diff --git a/update-manager b/update-manager index 6c1f3fd0..5c69addc 100644 --- a/update-manager +++ b/update-manager @@ -48,6 +48,9 @@ if __name__ == "__main__": # Begin parsing of options parser = OptionParser() + parser.add_option ("-c", "--check-dist-upgrades", action="store_true", + dest="check_dist_upgrades", default=False, + help="Check if a new distribution release is available") parser.add_option ("-d", "--devel-release", action="store_true", dest="devel_release", default=False, help="Check if upgrading to the latest devel release " -- cgit v1.2.3 From 8f811a14d7d26d87b9b79a910ba3202c49ebbf94 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Apr 2006 21:05:22 +0200 Subject: * UpdateManager/UpdateManager.py: only supress new release information --- UpdateManager/UpdateManager.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index 5773c5a6..cb2b4d10 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -739,15 +739,15 @@ class UpdateManager(SimpleGladeApp): def main(self, options): + gconfclient = gconf.client_get_default() + self.meta = MetaRelease(options.devel_release) + self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported) + # check if we are interessted in dist-upgrade information # (we are not by default on dapper) - gconfclient = gconf.client_get_default() if options.check_dist_upgrades or \ gconfclient.get_bool("/apps/update-manager/check_dist_upgrades"): - # the user wants to see the development release - self.meta = MetaRelease(options.devel_release) self.meta.connect("new_dist_available",self.new_dist_available) - self.meta.connect("dist_no_longer_supported",self.dist_no_longer_supported) while gtk.events_pending(): gtk.main_iteration() -- cgit v1.2.3 From f8a44b4bd3f1d72a3c56e5f17a443f33a5868067 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 12 Apr 2006 21:07:55 +0200 Subject: * removed some debug output --- UpdateManager/UpdateManager.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'UpdateManager') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index cb2b4d10..45638838 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -642,12 +642,12 @@ class UpdateManager(SimpleGladeApp): dialog.destroy() def on_button_dist_upgrade_clicked(self, button): - print "on_button_dist_upgrade_clicked" + #print "on_button_dist_upgrade_clicked" fetcher = DistUpgradeFetcher(self, self.new_dist) fetcher.run() def new_dist_available(self, meta_release, upgradable_to): - print "new_dist_available: %s" % upgradable_to.name + #print "new_dist_available: %s" % upgradable_to.name # check if the user already knowns about this dist #seen = self.gconfclient.get_string("/apps/update-manager/seen_dist") #if name == seen: -- cgit v1.2.3