do-release-upgrade should provide a way to upgrade to $distro-proposed
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-
ProcVersionSign
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
PackageArchitec
ProcEnviron:
TERM=xterm-
PATH=(custom, no user)
LANG=C.UTF-8
SourcePackage: ubuntu-
UpgradeStatus: Upgraded to bionic on 2020-05-26 (0 days ago)
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/DistUpgrad e.cfg, at the end of the [Sources] section add a ";AllowProposed =False" .
* In DistUpgradeCont roller: :rewriteSources List(), 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 DistUpgradeCont roller: :rewriteSources List(), update the clause that does the actual proposed disablement should be modified to look like this:
# Disable proposed on upgrade to a development release. devel_release == True
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
if (not entry.disabled
and not allow_proposed
and self.options and self.options.
and "%s-proposed" % self.fromDist in entry.dist):
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.