Merge lp://qastaging/~rbalint/update-manager/retry-after-failed-transaction into lp://qastaging/update-manager

Proposed by Balint Reczey
Status: Merged
Merged at revision: 2836
Proposed branch: lp://qastaging/~rbalint/update-manager/retry-after-failed-transaction
Merge into: lp://qastaging/update-manager
Diff against target: 159 lines (+50/-14)
5 files modified
UpdateManager/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)
To merge this branch: bzr merge lp://qastaging/~rbalint/update-manager/retry-after-failed-transaction
Reviewer Review Type Date Requested Status
Julian Andres Klode Approve
Brian Murray Pending
Review via email: mp+354648@code.qastaging.launchpad.net
To post a comment you must log in.
Revision history for this message
Balint Reczey (rbalint) wrote :

Since update-manager does not hold a lock unattended-upgrades can change installed packages behind its back and u-m gets a failed transaction due to holding an outdated cache.
The user is now notified about the problem and can try again.

Revision history for this message
Julian Andres Klode (juliank) wrote :

bug 1702083 is

  File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line 471, in update
    self.distUpgradeWouldDelete = cache.saveDistUpgrade()
AttributeError: 'NoneType' object has no attribute 'saveDistUpgrade'

I don't see how that's relevant here.

Revision history for this message
Balint Reczey (rbalint) wrote :

> bug 1702083 is
>
> File "/usr/lib/python3/dist-packages/UpdateManager/Core/UpdateList.py", line
> 471, in update
> self.distUpgradeWouldDelete = cache.saveDistUpgrade()
> AttributeError: 'NoneType' object has no attribute 'saveDistUpgrade'
>
> I don't see how that's relevant here.

Ah, yes, sorry, fixed to LP: #1791931

Revision history for this message
Julian Andres Klode (juliank) wrote :

Needs some fixing

review: Needs Fixing
2837. By Balint Reczey

Don't ask backend to do package operations aready done

Aptdaemon cancels the transaction when asked to remove packages already
removed which results the failure being shown to the user. This
is unnecessary as update-manager can just filter the package operations to
be done using a fresh cache and decrease the likelyhood of hitting
a race condition where packages to be removed are already removed.

LP: #1791931

2838. By Balint Reczey

Update changelog

Revision history for this message
Balint Reczey (rbalint) wrote :

> Needs some fixing

Thanks, fixed those.

Revision history for this message
Julian Andres Klode (juliank) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to status/vote changes: