Show reason of TransactionFailed and let the user try again instead of crashing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
update-manager (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
[Impact]
* Update-manager crashes when it tries to remove a package that was already removed since update-manager refreshed its cache. A typical scenario is when the list of available packages is updated, then update-manager pops up to notify the user about the updates. The user is not in front of the screen and unattended-upgrades installs the security updates and removes unused kernels making the list of updates shown to the user outdated. User clicks "Install now" and update-manager crashes.
* The fix shows the reason of the transaction failure then asks offers the user to try again.
[Test Case ]
(with Bionic's package names)
* Revert the patch for LP: #1791931 since it shadows the issue by filtering the package operations in advance.
* Install older kernel packages, downgrade a few packages and mark the kernels autoremovable:
$ sudo eatmydata apt install -y --allow-downgrades linux-headers-
* Start update-manager in a different terminal and _don't_ start the upgrade
* Remove kernel packages behind u-m's back:
$ sudo eatmydata apt remove -y linux-headers-
* Start the update on update-manager's GUI and observe it not crashing with the fixed version but showing the reason of the update failing and offering trying it again.
[Regression Potential]
* Inaccurate exception handling could shadow other problems.
[Original bug text]
On errors.ubuntu.com there are multiple crashes reported about update-manager that end in a Traceback like the following:
aptdaemon.
The following packages have unmet dependencies:
rhythmbox-
Naturally, the package name varies. I don't believe these are actually crashes about update-manager or aptdaemon. Rather there is something wrong with the users package system. Subsequently, it'd be better if these were not reported to the error tracker and clogging up the bug lists.
Related branches
- Julian Andres Klode: Approve
- Brian Murray: Pending requested
-
Diff: 159 lines (+50/-14)5 files modifiedUpdateManager/Core/MyCache.py (+2/-0)
UpdateManager/UpdateManager.py (+2/-2)
UpdateManager/backend/InstallBackendAptdaemon.py (+9/-1)
UpdateManager/backend/__init__.py (+23/-11)
debian/changelog (+14/-0)
- Brian Murray: Pending requested
- Julian Andres Klode: Pending requested
- Ubuntu Core Development Team: Pending requested
-
Diff: 159 lines (+50/-14)5 files modifiedUpdateManager/Core/MyCache.py (+2/-0)
UpdateManager/UpdateManager.py (+2/-2)
UpdateManager/backend/InstallBackendAptdaemon.py (+9/-1)
UpdateManager/backend/__init__.py (+23/-11)
debian/changelog (+14/-0)
tags: | added: trusty utopic |
Changed in update-manager (Ubuntu): | |
importance: | Undecided → High |
milestone: | none → ubuntu-14.10 |
Changed in update-manager (Ubuntu): | |
milestone: | ubuntu-14.10 → ubuntu-15.04 |
tags: | added: rls-v-incoming |
tags: |
added: rls-v-notfixing removed: rls-v-incoming |
Changed in update-manager (Ubuntu): | |
milestone: | ubuntu-15.04 → vivid-updates |
Changed in update-manager (Ubuntu): | |
status: | Confirmed → Fix Released |
Changed in update-manager (Ubuntu): | |
status: | Fix Released → Confirmed |
tags: | added: id-5b97ab08c18adb87fe7517e3 |
Changed in update-manager (Ubuntu): | |
status: | Confirmed → In Progress |
summary: |
- update-manager / aptdaemon TransactionFailed crashes are not problems - with update-manager + Show reason of TransactionFailed and let the user try again instead of + crashing |
description: | updated |
Changed in update-manager (Ubuntu): | |
status: | In Progress → Fix Committed |
Status changed to 'Confirmed' because the bug affects multiple users.