Merge lp://qastaging/~sil2100/ubuntu-release-upgrader/package-section-fix into lp://qastaging/ubuntu-release-upgrader

Proposed by Łukasz Zemczak
Status: Merged
Merged at revision: 3294
Proposed branch: lp://qastaging/~sil2100/ubuntu-release-upgrader/package-section-fix
Merge into: lp://qastaging/ubuntu-release-upgrader
Diff against target: 31 lines (+4/-3)
1 file modified
DistUpgrade/DistUpgradeCache.py (+4/-3)
To merge this branch: bzr merge lp://qastaging/~sil2100/ubuntu-release-upgrader/package-section-fix
Reviewer Review Type Date Requested Status
Julian Andres Klode Approve
Brian Murray Approve
Review via email: mp+373868@code.qastaging.launchpad.net

Commit message

New python3-apt bindings no longer provide Package.section, so switch to using Package.candidate.section whenever applicable. This fixes broken partial upgrades.

Description of the change

New python3-apt bindings no longer provide Package.section, so switch to using Package.candidate.section whenever applicable. This fixes broken partial upgrades.

I have tested this on eoan by installing a package with lots of dependencies, removing it (leaving many unneeded packages) and additionally downgrading of some other package. Then I ran dist-upgrade.py --partial etc., first on the package as-is (reproducing the failure) and then with the changes applied. Seems to work as expected.

I guess Julian originally mentioned going through the list of versions (via Package.versions) to get the section match, but I think that's not needed here and Package.candidate is more than enough.

To post a comment you must log in.
Revision history for this message
Julian Andres Klode (juliank) :
review: Needs Information
3295. By Łukasz Zemczak

As per Julian's recommendation, check .installed instead.

Revision history for this message
Łukasz Zemczak (sil2100) wrote :

Thanks Julian! That indeed seems like a much safer bet.

Revision history for this message
Brian Murray (brian-murray) wrote :

Thanks for fixing this!

review: Approve
Revision history for this message
Julian Andres Klode (juliank) :
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