Merge lp:~mvo/software-center/lp1225885 into lp:software-center

Proposed by Michael Vogt
Status: Merged
Approved by: dobey
Approved revision: 3324
Merged at revision: 3328
Proposed branch: lp:~mvo/software-center/lp1225885
Merge into: lp:software-center
Diff against target: 35 lines (+9/-5)
2 files modified
README (+2/-1)
softwarecenter/db/pkginfo_impl/aptcache.py (+7/-4)
To merge this branch: bzr merge lp:~mvo/software-center/lp1225885
Reviewer Review Type Date Requested Status
dobey Approve
Review via email: mp+215116@code.launchpad.net

Description of the change

A tiny branch to avoid crashing if a aptdaemon transaction contains no package data (LP: #1225885).

This is crash #3 on errors.ubuntu.com today.

To post a comment you must log in.
Revision history for this message
Michael Vogt (mvo) wrote :

Fwiw, I'm happy to handle the upload once this lands.

Revision history for this message
Natalia Bidart (nataliabidart) wrote :

Setting MP as Rejected to reduce numbers of landing candidates in @reviewlist. Change status again if this MP is still current.

Revision history for this message
dobey (dobey) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'README'
--- README 2012-05-22 12:13:02 +0000
+++ README 2014-04-10 09:30:36 +0000
@@ -21,7 +21,8 @@
21You can run a developer instance with:21You can run a developer instance with:
2222
23python setup.py build23python setup.py build
24./software-center24PYTHONPATH=./build/lib.linux-x86_64-2.7 ./bin/software-center
25(the PYTHONPATH needs to be adjusted depending on the architecture)
2526
26The initial launch of this will take a bit as it will build a private27The initial launch of this will take a bit as it will build a private
27search database but this is only needed once.28search database but this is only needed once.
2829
=== modified file 'softwarecenter/db/pkginfo_impl/aptcache.py'
--- softwarecenter/db/pkginfo_impl/aptcache.py 2012-12-18 10:23:55 +0000
+++ softwarecenter/db/pkginfo_impl/aptcache.py 2014-04-10 09:30:36 +0000
@@ -588,10 +588,13 @@
588588
589 # space calculation stuff589 # space calculation stuff
590 def _on_total_size_calculation_done(self, trans, space):590 def _on_total_size_calculation_done(self, trans, space):
591 pkgname = trans.packages[0][0]591 # ensure trans contains the data we expect, see LP: #1225885
592 self.emit(592 if trans.packages and trans.packages[0]:
593 "query-total-size-on-install-done",593 pkgname = trans.packages[0][0]
594 pkgname, trans.download, trans.space)594 self.emit(
595 "query-total-size-on-install-done",
596 pkgname, trans.download, trans.space)
597
595598
596 def _on_trans_simulate_error(self, error):599 def _on_trans_simulate_error(self, error):
597 LOG.exception("simulate failed")600 LOG.exception("simulate failed")

Subscribers

People subscribed via source and target branches