do-release-upgrade should provide a way to upgrade to $distro-proposed

Bug #1880760 reported by Simon Déziel
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-release-upgrader (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

It seems there is no way to do a release upgrade to $distro-proposed. do-release-upgrade has the --proposed flag but that only tells it to use the upgrader from $distro-proposed.

When validating bug fixes for distro upgrade problem (like LP: #1865218), it would be handy to have do-release-upgrade enable $distro-proposed in the sources.list.

Maybe 'do-release-upgrade --to-proposed' could be used for this?

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: ubuntu-release-upgrader-core 1:18.04.37
ProcVersionSignature: Ubuntu 5.3.0-53.47~18.04.1-generic 5.3.18
Uname: Linux 5.3.0-53-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.14
Architecture: amd64
CrashDB: ubuntu
Date: Tue May 26 21:07:14 2020
PackageArchitecture: all
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=C.UTF-8
SourcePackage: ubuntu-release-upgrader
UpgradeStatus: Upgraded to bionic on 2020-05-26 (0 days ago)

Revision history for this message
Simon Déziel (sdeziel) wrote :
Revision history for this message
Bryce Harrington (bryce) wrote :

We ended up not requiring this, as the SRU found another way to get uploaded. :-)

However, I did look into how we might go about implementing this. In case it might help someone else needing similar some day, here's what I was thinking:

* In do-release-upgrade, add a new command line option such as '--allow-proposed'. Like for options.allow_third_party, this option would set an environment variable "RELEASE_UPGRADER_ALLOW_PROPOSED" to "True"

* In data/DistUpgrade.cfg, at the end of the [Sources] section add a ";AllowProposed=False".

* In DistUpgradeController::rewriteSourcesList(), after the code that uses the config and env var settings to set mirror_check, add a similar section for a new 'allow_proposed=False' variable.

* Also in DistUpgradeController::rewriteSourcesList(), update the clause that does the actual proposed disablement should be modified to look like this:

            # Disable proposed on upgrade to a development release.
            if (not entry.disabled
                and not allow_proposed
                and self.options and self.options.devel_release == True
                and "%s-proposed" % self.fromDist in entry.dist):
                logging.debug("upgrade to development release, disabling proposed")
                entry.dist = "%s-proposed" % self.toDist
                entry.comment += _("Not for humans during development stage of release %s") % self.toDist
                entry.disabled = True
                continue

I *think* that's the correct logic. This should skip the removal of -proposed for any release, so if you enable proposed on your current system, it should leave proposed enabled on the target distro. The routine has a lot of branches so I may have missed some clause; I'd test well.

This wouldn't permit upgrading to a proposed distro from a non-proposed distro. If that functionality is wanted, then support would also need added for that. Probably somewhere around the loop that adds -updates and -security.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubuntu-release-upgrader (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.