diff -Nru software-center-5.2.7/debian/changelog software-center-5.2.9/debian/changelog --- software-center-5.2.7/debian/changelog 2012-09-26 07:39:45.000000000 +0000 +++ software-center-5.2.9/debian/changelog 2013-01-28 17:14:59.000000000 +0000 @@ -1,3 +1,23 @@ +software-center (5.2.9) precise-proposed; urgency=low + + [ Brian Murray ] + * software-center/paths.py: + - modify the OEM_CHANNEL_DESCRIPTOR path (LP: #1095823) + + -- Brian Murray Mon, 28 Jan 2013 09:14:24 -0800 + +software-center (5.2.8) precise-proposed; urgency=low + + [ Gary Lasker ] + * lp:~gary-lasker/software-center/handle-trans-cancel-lp1027209-for-5.2: + - backport of the transaction cancellation fix for bug LP: #1027209. + + [ Michael Vogt ] + * lp:~mvo/software-center/robustness-lp1054070 + - cherry pick fix for corruption fix LP: #1054070 + + -- Iain Lane Wed, 16 Jan 2013 18:25:47 +0000 + software-center (5.2.7) precise-proposed; urgency=low * lp:~mvo/software-center/oem-descriptor-in-user-agent-5.2: diff -Nru software-center-5.2.7/softwarecenter/backend/installbackend_impl/aptd.py software-center-5.2.9/softwarecenter/backend/installbackend_impl/aptd.py --- software-center-5.2.7/softwarecenter/backend/installbackend_impl/aptd.py 2012-07-18 15:18:43.000000000 +0000 +++ software-center-5.2.9/softwarecenter/backend/installbackend_impl/aptd.py 2013-01-28 17:11:45.000000000 +0000 @@ -182,6 +182,10 @@ 'transaction-stopped': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, (GObject.TYPE_PYOBJECT,)), + # emits a TransactionFinished object + 'transaction-cancelled': (GObject.SIGNAL_RUN_FIRST, + GObject.TYPE_NONE, + (GObject.TYPE_PYOBJECT,)), # emits with a pending_transactions list object 'transactions-changed': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE, @@ -834,6 +838,14 @@ self._logger.debug("_on_transaction_finished: %s %s %s" % ( trans, enum, trans.meta_data)) + # first check if there has been a cancellation of + # the install and fire a transaction-cancelled signal + # (see LP: #1027209) + if enum == enums.EXIT_CANCELLED: + result = TransactionFinishedResult(trans, False) + self.emit("transaction-cancelled", result) + return + # show error if enum == enums.EXIT_FAILED: # Handle invalid packages separately diff -Nru software-center-5.2.7/softwarecenter/backend/reviews/__init__.py software-center-5.2.9/softwarecenter/backend/reviews/__init__.py --- software-center-5.2.7/softwarecenter/backend/reviews/__init__.py 2012-06-27 14:44:59.000000000 +0000 +++ software-center-5.2.9/softwarecenter/backend/reviews/__init__.py 2013-01-28 17:11:45.000000000 +0000 @@ -324,9 +324,10 @@ outfile = self.REVIEW_STATS_BSDDB_FILE outdir = self.REVIEW_STATS_BSDDB_FILE + ".dbenv/" self._dump_bsddbm_for_unity(outfile, outdir) - except bdb.DBError as e: + except (bdb.DBError, MemoryError) as e: # see bug #858437, db corruption seems to be rather common # on ecryptfs + # see also bug #1054070 for the MemoryError LOG.warn("error creating bsddb: '%s' (corrupted?)" % e) try: shutil.rmtree(outdir) diff -Nru software-center-5.2.7/softwarecenter/paths.py software-center-5.2.9/softwarecenter/paths.py --- software-center-5.2.7/softwarecenter/paths.py 2012-09-12 08:14:45.000000000 +0000 +++ software-center-5.2.9/softwarecenter/paths.py 2013-01-28 17:14:07.000000000 +0000 @@ -71,7 +71,7 @@ "/update-timestamp") # OEM -OEM_CHANNEL_DESCRIPTOR = "/var/lib/ubuntu-dist-channel" +OEM_CHANNEL_DESCRIPTOR = "/var/lib/ubuntu_dist_channel" # ratings&review diff -Nru software-center-5.2.7/softwarecenter/ui/gtk3/panes/availablepane.py software-center-5.2.9/softwarecenter/ui/gtk3/panes/availablepane.py --- software-center-5.2.7/softwarecenter/ui/gtk3/panes/availablepane.py 2012-07-18 15:21:19.000000000 +0000 +++ software-center-5.2.9/softwarecenter/ui/gtk3/panes/availablepane.py 2013-01-28 17:11:45.000000000 +0000 @@ -225,8 +225,11 @@ self.on_transactions_changed) self.backend.connect("transaction-finished", self.on_transaction_complete) + self.backend.connect("transaction-cancelled", + self.on_transaction_cancelled) + # a transaction error is treated the same as a cancellation self.backend.connect("transaction-stopped", - self.on_transaction_complete) + self.on_transaction_cancelled) # now we are initialized self.searchentry.set_sensitive(True) @@ -394,11 +397,19 @@ self._update_action_bar() def on_transaction_complete(self, backend, result): + """ handle a transaction that has completed successfully + """ if result.pkgname in self.unity_launcher_transaction_queue: transaction_details = ( self.unity_launcher_transaction_queue.pop(result.pkgname)) self._add_application_to_unity_launcher(transaction_details) + def on_transaction_cancelled(self, backend, result): + """ handle a transaction that has been cancelled + """ + if result.pkgname in self.unity_launcher_transaction_queue: + self.unity_launcher_transaction_queue.pop(result.pkgname) + def _register_unity_launcher_transaction_started(self, pkgname, appname, trans_id, trans_type): # at the start of the transaction, we gather details for use later diff -Nru software-center-5.2.7/softwarecenter/version.py software-center-5.2.9/softwarecenter/version.py --- software-center-5.2.7/softwarecenter/version.py 2012-09-26 08:28:25.000000000 +0000 +++ software-center-5.2.9/softwarecenter/version.py 2013-01-28 17:24:11.000000000 +0000 @@ -1,5 +1,5 @@ -VERSION='5.2.7' +VERSION='5.2.9' CODENAME='precise-proposed' DISTRO='Ubuntu' RELEASE='12.04'