ubuntu-release-upgrader:ubuntu/main

Last commit made on 2024-07-11
Get this branch:
git clone -b ubuntu/main https://git.launchpad.net/ubuntu-release-upgrader
Members of Ubuntu Core Development Team can upload to this branch. Log in for directions.

Branch merges

Branch information

Name:
ubuntu/main
Repository:
lp:ubuntu-release-upgrader

Recent commits

8e59fb1... by Nick Rosbrook

Release ubuntu-release-upgrader 1:24.10.5

ca33904... by Nick Rosbrook

Run pre-build.sh: updating mirrors, demotions, and translations.

5a45a94... by Julian Andres Klode

Reimplement obsolete removal with resolve_by_keep

Basically the idea is that we pass auto_fix=False to the cache
and then use resolve_by_keep() to revert any removals that cause
additional removals.

This is easier than it sounds however, as we need to pay special
attention to forced_obsoletes. As can be seen in the code, forced
obsoletes also remove additional dependencies (they do not check
the changes made by mark_delete() and revert it).

So we solve this with a two stage approach:

1. We mark the forced obsoletes for removal with auto_fix turned
   on. This will keep the behavior for them the same. If one of
   them can't be removed, we end up reverting it.

   For this, we need to keep the code to create and restore the
   snapshot.

2. We mark the other packages for removal without auto_fix and
   then call ProblemResolver.resolve_by_keep() to fix any broken
   packages by keeping them back.

This brings runtime from multiple seconds down to half a second
for a bare lxd container:

2024-04-29 10:34:35,549 DEBUG Start checking for obsolete pkgs
2024-04-29 10:34:35,912 DEBUG Finish checking for obsolete pkgs

It used to be over 11s before:

2024-04-29 10:28:59,382 DEBUG Start checking for obsolete pkgs
2024-04-29 10:29:11,855 DEBUG Finish checking for obsolete pkgs

LP: #1874272

c99e1f3... by Julian Andres Klode

Move the actiongroup out of the obsoletes loop

This improves performance as we do not need to check for autoremovable
packages after each removal.

a063051... by Nick Rosbrook

DistUpgrade: clean up backup sources

Either on abort, or on a successful upgrade, remove the backup sources
created before migrating and rewriting sources. Leaving these around
creates clutter.

5664621... by Nick Rosbrook

DistUpgrade: handle deb822 migration rollback on abort

211b025... by Nick Rosbrook

DistUpgrade: only leave comment in sources.list if we migrated it

d74a647... by Nick Rosbrook

DistUpgrade: don't make Deb822SourceEntry import conditional

This is safe to do unconditionally now.

Gbp-Dch: Short

e1b2638... by Nick Rosbrook

update changelog

c690161... by Nick Rosbrook

DistUpgradeCache: remove unused methods and variables

Reported by vulture.

Gbp-Dch: Short