From 8da0ea4e985d947ff176d2f5e5eada1f1d255a1e Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 28 Jun 2006 10:19:54 +0200 Subject: * speedups in the MyCache.clear() code * minor code cleanups (move the depcache code into _initDepCcche()) --- debian/changelog | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index 31679a80..200ee407 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +update-manager (0.43) edgy; urgency=low + + * fixes in the changelog reading code + * speedup in the cache clear code + + -- Michael Vogt Wed, 28 Jun 2006 10:17:48 +0200 + update-manager (0.42.2ubuntu22) dapper; urgency=low * UpdateManager/UpdateManager.py: -- cgit v1.2.3 From 6d740ab2dee60d3fe10c563932fc62d5dd5d2057 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 4 Jul 2006 11:25:23 +0200 Subject: * SoftwareProperties/aptsources.py: - added edgy sources * debian/changelog: - prepared a new upload --- SoftwareProperties/aptsources.py | 21 +++++++++++++++++++++ debian/changelog | 5 ++++- 2 files changed, 25 insertions(+), 1 deletion(-) (limited to 'debian') diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index 74ef2f4a..5da04b23 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -468,6 +468,27 @@ class SourceEntryMatcher: "^dapper-updates$", _("Ubuntu 6.06 LTS Updates"), ubuntu_comps, ubuntu_comps_descr)) + # edgy + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^edgy-security$", + _("Ubuntu 6.10 Security Updates"), + ubuntu_comps, ubuntu_comps_descr)) + self.dist_list.append(self.MatchDist(".*security.ubuntu.com/ubuntu", + "^edgy-security$", + _("Ubuntu 6.10 Security Updates"), + ubuntu_comps, ubuntu_comps_descr)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^edgy$", + "Ubuntu 6.10", + ubuntu_comps, ubuntu_comps_descr)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^edgy-backports$", + _("Ubuntu 6.10 Backports"), + ubuntu_comps, ubuntu_comps_descr)) + self.dist_list.append(self.MatchDist(".*archive.ubuntu.com/ubuntu", + "^edgy-updates$", + _("Ubuntu 6.10 Updates"), + ubuntu_comps, ubuntu_comps_descr)) # DEBIAN diff --git a/debian/changelog b/debian/changelog index 200ee407..55cb82bc 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,8 +2,11 @@ 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 Wed, 28 Jun 2006 10:17:48 +0200 + -- Michael Vogt Tue, 4 Jul 2006 11:16:31 +0200 update-manager (0.42.2ubuntu22) dapper; urgency=low -- cgit v1.2.3 From dc51a1fbcc190ada20439979c0546a459a0edabd Mon Sep 17 00:00:00 2001 From: "glatzor@ubuntu.com" <> Date: Wed, 19 Jul 2006 22:38:09 +0200 Subject: * allow to specify a server for all distro sources * use iso-codes to display "Server for COUNTRY" instead of the URL * depend on iso-codes * write the deb-src next to the corresponding binary line * minor code improvements * don't only the enable the comps for a mirror repo if a new one is added - this is just too much magic * try to reuse a disabled matching source if a new is added * bug fixes: - don't use out commented sources for the distribution - add a new source if there is none for an enabled comp or reuse the already existing ones - do not show disabled sources in the list - wrong inconsistent state of the source code button --- SoftwareProperties/SoftwareProperties.py | 150 ++++++++++++++++++++++--------- SoftwareProperties/aptsources.py | 46 ++++++---- debian/control | 2 +- 3 files changed, 138 insertions(+), 60 deletions(-) (limited to 'debian') diff --git a/SoftwareProperties/SoftwareProperties.py b/SoftwareProperties/SoftwareProperties.py index 28d550eb..f9fb2c43 100644 --- a/SoftwareProperties/SoftwareProperties.py +++ b/SoftwareProperties/SoftwareProperties.py @@ -92,6 +92,21 @@ class Distribution: del pipe (self.id, self.codename, self.description, self.release) = lsb_info + # get a list of country codes and real names + self.countries = {} + try: + f = open("/usr/share/iso-codes/iso_3166.tab", "r") + lines = f.readlines() + for line in lines: + parts = line.split("\t") + self.countries[parts[0].lower()] = parts[1] + except: + print "could not open file '%s'" % file + else: + f.close() + + + def get_sources(self, sources_list): """ Find the corresponding template, main and child sources @@ -101,6 +116,7 @@ class Distribution: self.source_template = None self.child_sources = [] self.main_sources = [] + self.disabled_sources = [] self.cdrom_sources = [] self.enabled_comps = [] self.used_media = [] @@ -112,7 +128,7 @@ class Distribution: self.use_internet = False self.main_server = "" self.nearest_server = "" - self.other_servers = [] + self.used_servers = [] # find the distro template for template in sources_list.matcher.templates: @@ -140,13 +156,16 @@ class Distribution: # cdroms need do be handled differently if source.uri.startswith("cdrom:"): self.cdrom_sources.append(source) - if source.type == "deb": + if source.type == "deb" and source.disabled == False: self.main_sources.append(source) - if source.disabled == False: - comps.extend(source.comps) - media.append(source.uri) - elif source.type == "deb-src": + comps.extend(source.comps) + media.append(source.uri) + elif source.type == "deb" and source.disabled == True: + self.disabled_sources.append(source) + elif source.type.endswith("-src") and source.disabled == False: self.source_code_sources.append(source) + elif source.type.endswith("-src") and source.disabled == True: + self.disabled_sources.append(source) if source.template in self.source_template.children: #print "yeah! child found: %s" % source.template.name if source.type == "deb": @@ -173,8 +192,10 @@ class Distribution: z = locale.find(".") if z == -1: z = len(locale) - country = locale[a+1:z].lower() - self.nearest_server = "http://%s.archive.ubuntu.com/ubuntu/" % country + country_code = locale[a+1:z].lower() + self.nearest_server = "http://%s.archive.ubuntu.com/ubuntu/" % \ + country_code + self.country = self.countries[country_code] # other used servers for medium in self.used_media: @@ -183,12 +204,13 @@ class Distribution: else: # seems to be a network source self.use_internet = True - if not re.match(medium, self.main_server) and \ - not re.match(medium, self.nearest_server): - self.other_servers.append(medium) + self.used_servers.append(medium) def add_source(self, sources_list, type=None, uri=None, dist=None, comps=None, comment=""): + """ + Add distribution specific sources + """ if uri == None: # FIXME: Add support for the server selector uri = self.main_server @@ -200,11 +222,13 @@ class Distribution: type = "deb" if comment == "": comment == "Added by software-properties" - - sources_list.add(type, uri, dist, comps, comment) - # FIXME: get rid of the ui dependency - if self.get_source_code == True: - sources_list.add("deb-src", uri, dist, comps, comment) + new_source = sources_list.add(type, uri, dist, comps, comment) + # if source code is enabled add a deb-src line after the new + # source + if self.get_source_code == True and not type.endswith("-src"): + sources_list.add("%s-src" % type, uri, dist, comps, comment, + file=new_source.file, + pos=sources_list.list.index(new_source)+1) class SoftwareProperties(SimpleGladeApp): @@ -225,9 +249,14 @@ class SoftwareProperties(SimpleGladeApp): cell = gtk.CellRendererText() self.combobox_server.pack_start(cell, True) self.combobox_server.add_attribute(cell, 'text', 0) - - #self.gnome_program = gnome.init("Software Properties", "0.41") - #self.gconfclient = gconf.client_get_default() + + # set up the handler id for the callbacks + self.handler_server_changed = self.combobox_server.connect("changed", + self.on_combobox_server_changed) + self.handler_source_code_changed = self.checkbutton_source_code.connect( + "toggled", + self.on_checkbutton_source_code_toggled + ) if parent: self.window_main.set_type_hint(gtk.gdk.WINDOW_TYPE_HINT_DIALOG) @@ -415,28 +444,41 @@ class SoftwareProperties(SimpleGladeApp): else: self.checkbutton_cdrom.set_active(False) - # FIXME: needs inconsistence + # Intiate the combobox which allows do specify a server for all + # distro related sources if self.distribution.use_internet == True: self.checkbutton_internet.set_active(True) self.combobox_server.set_property("sensitive", True) else: self.checkbutton_internet.set_active(False) self.combobox_server.set_property("sensitive", False) + self.combobox_server.handler_block(self.handler_server_changed) server_store = gtk.ListStore(gobject.TYPE_STRING, gobject.TYPE_STRING) self.combobox_server.set_model(server_store) - # load the mirror list in to the combo and select the one of the first - # main source - server_store.append([_("%s (default)") % self.distribution.main_server, + server_store.append([_("Main server"), self.distribution.main_server]) - server_store.append([_("%s (nearest)") % self.distribution.nearest_server, - self.distribution.main_server]) - for server in self.distribution.other_servers: - server_store.append(["%s" % server, server]) - # FIXME: which one to choose? - self.combobox_server.set_active(0) - self.combobox_server.connect("changed", self.on_combobox_server_changed) + server_store.append([_("Server for %s") % gettext.dgettext("iso-3166", + self.distribution.country).rstrip(), + self.distribution.nearest_server]) + if len(self.distribution.used_servers) > 0: + for server in self.distribution.used_servers: + if not re.match(server, self.distribution.main_server) and \ + not re.match(server, self.distribution.nearest_server): + server_store.append(["%s" % server, server]) + if len(self.distribution.used_servers) > 1: + server_store.append([_("Custom servers"), None]) + self.combobox_server.set_active(2) + elif self.distribution.used_servers[0] == self.distribution.main_server: + self.combobox_server.set_active(0) + elif self.distribution.used_servers[0] == self.distribution.nearest_server: + self.combobox_server.set_active(1) + else: + self.combobox_server.set_active(0) + + self.combobox_server.handler_unblock(self.handler_server_changed) # Check for source code sources + self.checkbutton_source_code.handler_block(self.handler_source_code_changed) self.checkbutton_source_code.set_inconsistent(False) if len(self.distribution.source_code_sources) < 1: # we don't have any source code sources, so @@ -455,7 +497,8 @@ class SoftwareProperties(SimpleGladeApp): sources.extend(self.distribution.child_sources) for source in sources: if templates.has_key(source.template): - templates[source.template] += set(source.comps) + for comp in source.comps: + templates[source.template].add(comp) else: templates[source.template] = set(source.comps) # add fake http sources for the cdrom, since the sources @@ -468,14 +511,29 @@ class SoftwareProperties(SimpleGladeApp): for source in self.distribution.source_code_sources: if not templates.has_key(source.template) or \ (templates.has_key(source.template) and \ - len(set(templates[source.template]) ^ set(source.comps)) > 0): + len(set(templates[source.template]) ^ set(source.comps)) != 0): self.checkbutton_source_code.set_inconsistent(True) self.distribution.get_source_code = False break - self.checkbutton_source_code.connect("toggled", - self.on_checkbutton_source_code_toggled) + self.checkbutton_source_code.handler_unblock(self.handler_source_code_changed) + def on_combobox_server_changed(self, combobox): - print "FIXME" + """ + Replace the servers used by the main and update sources with + the selected one + """ + server_store = combobox.get_model() + iter = combobox.get_active_iter() + uri_selected = server_store.get_value(iter, 1) + sources = [] + sources.extend(self.distribution.main_sources) + sources.extend(self.distribution.child_sources) + sources.extend(self.distribution.source_code_sources) + for source in sources: + # FIXME: ugly + if not "security.ubuntu.com" in source.uri: + source.uri = uri_selected + self.massive_debug_output() def on_component_toggled(self, checkbutton, comp): """ @@ -489,11 +547,12 @@ class SoftwareProperties(SimpleGladeApp): # check if there is a main source at all if len(self.distribution.main_sources) < 1: # create a new main source - self.distribution.add_source(self.sourceslist, comps=[comp]) - # add the comp to all main, child and source code sources - for source in sources: - if comp not in source.comps: - source.comps.append(comp) + self.distribution.add_source(self.sourceslist, comps=["%s"%comp]) + else: + # add the comp to all main, child and source code sources + for source in sources: + if comp not in source.comps: + source.comps.append(comp) if self.distribution.get_source_code == True: for source in self.distribution.source_code_sources: if comp not in source.comps: source.comps.append(comp) @@ -549,13 +608,17 @@ class SoftwareProperties(SimpleGladeApp): source.uri, source.dist, source.comps, - "Added by software-properties") + "Added by software-properties", + self.sourceslist.list.index(source)+1, + source.file) for source in self.distribution.cdrom_sources: self.sourceslist.add("deb-src", self.distribution.source_template.base_uri, self.distribution.source_template.name, source.comps, - "Added by software-properties") + "Added by software-properties", + self.sourceslist.list.index(source)+1, + source.file) self.massive_debug_output() def open_file(self, file): @@ -735,7 +798,8 @@ class SoftwareProperties(SimpleGladeApp): for source in self.sourceslist.list: if not source.invalid and\ ((source not in self.distribution.main_sources and\ - source not in self.distribution.child_sources) or\ + source not in self.distribution.child_sources and\ + source not in self.distribution.disabled_sources) or\ source in self.distribution.cdrom_sources) and\ source not in self.distribution.source_code_sources: self.sourceslist_visible.append(source) diff --git a/SoftwareProperties/aptsources.py b/SoftwareProperties/aptsources.py index fc08fb12..f96bd959 100644 --- a/SoftwareProperties/aptsources.py +++ b/SoftwareProperties/aptsources.py @@ -30,6 +30,8 @@ import shutil import time import os.path +import pdb + from UpdateManager.Common.DistInfo import DistInfo @@ -64,12 +66,8 @@ def is_mirror(master_uri, compare_uri): return False def uniq(s): - """ simple (and not efficient) way to return uniq list """ - u = [] - for x in s: - if x not in u: - u.append(x) - return u + """ simple and efficient way to return uniq list """ + return list(set(s)) @@ -232,16 +230,29 @@ class SourcesList: yield entry raise StopIteration - def add(self, type, uri, dist, comps, comment="", pos=-1): - # if there is a repo with the same (type, uri, dist) just add the - # components - for i in self.list: - if i.type == type and is_mirror(uri,i.uri) and i.dist == dist: - comps = uniq(i.comps + comps) - # set to the old position and preserve comment - comment = i.comment - pos = self.list.index(i) - self.list.remove(i) + def add(self, type, uri, dist, comps, comment="", pos=-1, file=None): + """ + Add a new source to the sources.list. + The method will search for existing matching repos and will try to + reuse them as far as possible + """ + for source in self.list: + # if there is a repo with the same (type, uri, dist) just add the + # components + if source.disabled == False and source.invalid == False and \ + source.type == type and uri == source.uri and \ + source.dist == dist: + comps = uniq(source.comps + comps) + source.comps = comps + return source + # if there is a corresponding repo which is disabled, enable it + elif source.disabled == True and source.invalid == False and \ + source.type == type and uri == source.uri and \ + source.dist == dist and \ + len(set(source.comps) & set(comps)) == len(comps): + source.disabled = False + return source + # there isn't any matching source, so create a new line and parse it line = "%s %s %s" % (type,uri,dist) for c in comps: line = line + " " + c; @@ -249,8 +260,11 @@ class SourcesList: line = "%s #%s\n" %(line,comment) line = line + "\n" new_entry = SourceEntry(line) + if file != None: + new_entry.file = file self.matcher.match(new_entry) self.list.insert(pos, new_entry) + return source def remove(self, source_entry): self.list.remove(source_entry) diff --git a/debian/control b/debian/control index a4999f1a..af942223 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.6.2 Package: update-manager Architecture: all -Depends: ${python:Depends}, ${misc:Depends}, python, python-glade2, python-apt (>= 0.6.16.2), synaptic (>= 0.57.8), lsb-release, python-gnupginterface, unattended-upgrades, gksu +Depends: ${python:Depends}, ${misc:Depends}, python, python-glade2, python-apt (>= 0.6.16.2), synaptic (>= 0.57.8), lsb-release, python-gnupginterface, unattended-upgrades, gksu, iso-codes 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 -- cgit v1.2.3 From eb74fddcc11cf40ef207157a36308aa29801e907 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Aug 2006 10:33:16 +0200 Subject: * UpdateManager/DistUpgradeFetcher.py: - don't use the trustdb anymore because it if mode 0600 and can't be read as user --- UpdateManager/DistUpgradeFetcher.py | 4 +--- debian/changelog | 8 ++++++++ 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'debian') diff --git a/UpdateManager/DistUpgradeFetcher.py b/UpdateManager/DistUpgradeFetcher.py index 4aacdae4..af07cfb4 100644 --- a/UpdateManager/DistUpgradeFetcher.py +++ b/UpdateManager/DistUpgradeFetcher.py @@ -105,15 +105,13 @@ class DistUpgradeFetcher(object): return True def gpgauthenticate(self, file, signature, - keyring='/etc/apt/trusted.gpg', - trustdb='/etc/apt/trustdb.gpg'): + keyring='/etc/apt/trusted.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-options', '--no-default-keyring', - '--trustdb-name',trustdb, '--keyring', keyring] proc = gpg.run(['--verify', signature, file], create_fhs=['status','logger','stderr']) diff --git a/debian/changelog b/debian/changelog index 981c5564..c5347d2e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +update-manager (0.44.1) edgy; urgency=low + + * make UpdateManager check for new distribution releases by + default again + * fix dist-upgrade fetching when run as root. + + -- + update-manager (0.44) edgy; urgency=low * new SoftwareProperties GUI (thanks to Sebastian Heinlein) -- cgit v1.2.3 From 6de4c375de972ad34a15dbe56305d62e8faa23a0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Aug 2006 12:41:24 +0200 Subject: * UpdateManager/UpdateManager.py: - implemented support to show what origin the update comes from --- UpdateManager/UpdateManager.py | 104 ++++++++++++++++++++++++++++------------- debian/changelog | 1 + 2 files changed, 73 insertions(+), 32 deletions(-) (limited to 'debian') diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index d1a680fb..ce46d737 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -69,8 +69,7 @@ from MetaRelease import Dist, MetaRelease # - kill "all_changes" and move the changes into the "Update" class # list constants -(LIST_INSTALL, LIST_CONTENTS, LIST_NAME, LIST_SHORTDESC, - LIST_VERSION, LIST_LONG_DESCR, LIST_PKG) = range(7) +(LIST_INSTALL, LIST_CONTENTS, LIST_NAME, LIST_PKG) = range(4) # actions for "invoke_manager" (INSTALL, UPDATE) = range(2) @@ -201,23 +200,43 @@ class MyCache(apt.Cache): lock.release() class UpdateList: + ORIGIN_MAPPING = { ("edgy-security","Ubuntu"): _("Ubuntu security updates"), + ("edgy-updates","Ubuntu"): _("Ubuntu important updates updates"), + ("edgy","Ubuntu"): _("Ubuntu updates") + } + def __init__(self, parent_window): - self.pkgs = [] + # a map of packages under their origin + self.pkgs = {} self.num_updates = 0 self.parent_window = parent_window def update(self, cache): held_back = [] broken = [] + + # do the upgrade cache.saveDistUpgrade() + + # sort by origin for pkg in cache: if pkg.markedUpgrade or pkg.markedInstall: - self.pkgs.append(pkg) + originstr = _("Unknown") + for aorigin in pkg.candidateOrigin: + archive = aorigin.archive + origin = aorigin.origin + if self.ORIGIN_MAPPING.has_key((archive,origin)) and aorigin.trusted: + originstr = self.ORIGIN_MAPPING[(archive,origin)] + if not self.pkgs.has_key(originstr): + self.pkgs[originstr] = [] + self.pkgs[originstr].append(pkg) self.num_updates = self.num_updates + 1 elif pkg.isUpgradable: - #print "MarkedKeep: %s " % pkg.name held_back.append(pkg.name) - self.pkgs.sort(lambda x,y: cmp(x.name,y.name)) + for l in self.pkgs.keys(): + self.pkgs[l].sort(lambda x,y: cmp(x.name,y.name)) + + # check if we have held-back something if cache._depcache.KeepCount > 0: #print "WARNING, keeping packages" msg = ("%s\n\n%s" % \ @@ -295,32 +314,34 @@ class UpdateManager(SimpleGladeApp): self.button_close.connect("clicked", lambda w: self.exit()) # the treeview (move into it's own code!) - self.store = gtk.ListStore(gobject.TYPE_BOOLEAN, str, str, str, str, str, - gobject.TYPE_PYOBJECT) + self.store = gtk.ListStore(gobject.TYPE_BOOLEAN, str, str, gobject.TYPE_PYOBJECT) self.treeview_update.set_model(self.store) self.treeview_update.set_headers_clickable(True); tr = gtk.CellRendererText() tr.set_property("xpad", 10) tr.set_property("ypad", 10) - cr = gtk.CellRendererToggle() + self.cr = cr = gtk.CellRendererToggle() cr.set_property("activatable", True) cr.set_property("xpad", 10) cr.connect("toggled", self.toggled) - self.cb = gtk.TreeViewColumn("Install", cr, active=LIST_INSTALL) - c0 = gtk.TreeViewColumn("Name", tr, markup=LIST_CONTENTS) - c0.set_resizable(True) + + column_install = gtk.TreeViewColumn("Install", cr) + column_install.set_cell_data_func (cr, self.install_column_view_func) + column = gtk.TreeViewColumn("Name", tr, markup=LIST_CONTENTS) + column.set_cell_data_func (tr, self.package_column_view_func) + column.set_resizable(True) major,minor,patch = gtk.pygtk_version if (major >= 2) and (minor >= 5): - self.cb.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - self.cb.set_fixed_width(30) - c0.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) - c0.set_fixed_width(100) + column_install.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) + column_install.set_fixed_width(30) + column.set_sizing(gtk.TREE_VIEW_COLUMN_FIXED) + column.set_fixed_width(100) #self.treeview_update.set_fixed_height_mode(True) - self.treeview_update.append_column(self.cb) - self.cb.set_visible(True) - self.treeview_update.append_column(c0) + self.treeview_update.append_column(column_install) + column_install.set_visible(True) + self.treeview_update.append_column(column) self.treeview_update.set_search_column(LIST_NAME) @@ -356,6 +377,23 @@ class UpdateManager(SimpleGladeApp): self.restore_state() self.window_main.show() + def header_column_func(self, cell_layot, renderer, model, iter): + pkg = model.get_value(iter, LIST_PKG) + if pkg == None: + renderer.set_property("cell-background","green") + else: + renderer.set_property("cell-background", None) + + def install_column_view_func(self, cell_layout, renderer, model, iter): + self.header_column_func(cell_layout, renderer, model, iter) + pkg = model.get_value(iter, LIST_PKG) + if self.cr == renderer: + renderer.set_property("visible", pkg != None) + + + def package_column_view_func(self, cell_layout, renderer, model, iter): + self.header_column_func(cell_layout, renderer, model, iter) + def setupDbus(self): """ this sets up a dbus listener if none is installed alread """ # check if there is another g-a-i already and if not setup one @@ -429,7 +467,10 @@ class UpdateManager(SimpleGladeApp): iter = model.get_iter(path) # set descr - long_desc = model.get_value(iter, LIST_LONG_DESCR) + pkg = model.get_value(iter, LIST_PKG) + if pkg == None: + return + long_desc = pkg.description if long_desc == None: return # Skip the first line - it's a duplicate of the summary @@ -526,7 +567,7 @@ class UpdateManager(SimpleGladeApp): self.notebook_details.set_sensitive(True) self.treeview_update.set_sensitive(True) self.button_install.grab_default() - self.treeview_update.set_cursor(0) + self.treeview_update.set_cursor(1) self.label_header.set_markup(text_header) self.label_downsize.set_markup(text_download) @@ -657,17 +698,16 @@ class UpdateManager(SimpleGladeApp): self.list.update(self.cache) if self.list.num_updates > 0: i=0 - for pkg in self.list.pkgs: - - name = xml.sax.saxutils.escape(pkg.name) - summary = xml.sax.saxutils.escape(pkg.summary) - contents = "%s\n%s\n\n" % (name, summary) - contents = contents + _("New version: %s (Size: %s)") % (pkg.candidateVersion,apt.SizeToStr(pkg.packageSize)) + "" - - iter = self.store.append([True, contents, pkg.name, pkg.summary, - pkg.candidateVersion, pkg.description, pkg]) - self.add_update(pkg) - i = i + 1 + for origin in self.list.pkgs.keys(): + self.store.append([False, '%s' % origin, origin, None]) + for pkg in self.list.pkgs[origin]: + name = xml.sax.saxutils.escape(pkg.name) + summary = xml.sax.saxutils.escape(pkg.summary) + contents = "%s\n%s\n\n" % (name, summary) + contents = contents + _("New version: %s (Size: %s)") % (pkg.candidateVersion,apt.SizeToStr(pkg.packageSize)) + "" + iter = self.store.append([True, contents, pkg.name, pkg]) + self.add_update(pkg) + i = i + 1 self.update_count() # use the normal cursor diff --git a/debian/changelog b/debian/changelog index c5347d2e..cfad987e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,6 +3,7 @@ update-manager (0.44.1) edgy; urgency=low * make UpdateManager check for new distribution releases by default again * fix dist-upgrade fetching when run as root. + * sort the package list by the origin (UpdateManagerEdgy spec) -- -- cgit v1.2.3 From 7b05e4d20c50c14fee61be8555646039ae04f419 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 2 Aug 2006 13:01:02 +0200 Subject: * changelog finalized --- debian/changelog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'debian') diff --git a/debian/changelog b/debian/changelog index cfad987e..3686ed50 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,10 +2,10 @@ update-manager (0.44.1) edgy; urgency=low * make UpdateManager check for new distribution releases by default again - * fix dist-upgrade fetching when run as root. + * fix dist-upgrade fetching when run as non-root. * sort the package list by the origin (UpdateManagerEdgy spec) - -- + -- Michael Vogt Wed, 2 Aug 2006 13:00:42 +0200 update-manager (0.44) edgy; urgency=low -- cgit v1.2.3