Skip to content

Bail early on illegal upgrade, fixes #1129 - #1304

Closed
jeppetrost wants to merge 1 commit into
nextcloud:masterfrom
jeppetrost:jeppetrost-patch-illegal-upgrade-two-major-versions
Closed

jeppetrost wants to merge 1 commit into
nextcloud:masterfrom
jeppetrost:jeppetrost-patch-illegal-upgrade-two-major-versions

Conversation

@jeppetrost

@jeppetrost jeppetrost commented Nov 13, 2020

Copy link
Copy Markdown

Added a helper function to check whether the upgrade is doable: returns true if major version (installed) + 1 is -lt major version (image).
This lets you upgrade from eg. 10.X.Y -> 10.X+1.Z and 10.X.Y -> 11.A.B, but not 10.X.Y -> 12.A.B.
If it detects this, the script will notify and bail immediately.
Fixes #1129

Added a helper function to check whether the upgrade is doable: returns true if major version (installed) + 1 is -lt major version (image).
This lets you upgrade from eg. 10.X.Y -> 10.X+1.Z and 10.X.Y -> 11.A.B, but not 10.X.Y -> 12.A.B.
If it detects this, the script will notify and bail immediately.
@jeppetrost jeppetrost changed the title Bail early on illegal upgrade Bail early on illegal upgrade, fixes #1129 Nov 13, 2020
@jeppetrost jeppetrost closed this Aug 12, 2022
@wetneb

wetneb commented Jun 24, 2023

Copy link
Copy Markdown
Contributor

Sad that this was not merged! It would have saved me quite some trouble. I have opened a new version of this PR here: #2018.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Upgrade attempt over 2 major versions leads to hardly recoverable state

3 participants