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.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1880760

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+bug/1880760/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to