mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
Bump work version to zap for pmb 3.0.0 (MR 2352)
Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
8da12a98a7
commit
ebef789f7c
2 changed files with 17 additions and 1 deletions
|
@ -46,7 +46,7 @@ pmaports_min_version = "7"
|
||||||
# Version of the work folder (as asked during 'pmbootstrap init'). Increase
|
# Version of the work folder (as asked during 'pmbootstrap init'). Increase
|
||||||
# this number, whenever migration is required and provide the migration code,
|
# this number, whenever migration is required and provide the migration code,
|
||||||
# see migrate_work_folder()).
|
# see migrate_work_folder()).
|
||||||
work_version = 6
|
work_version = 7
|
||||||
|
|
||||||
# Minimum required version of postmarketos-ondev (pmbootstrap install --ondev).
|
# Minimum required version of postmarketos-ondev (pmbootstrap install --ondev).
|
||||||
# Try to support the current versions of all channels (edge, v21.03). When
|
# Try to support the current versions of all channels (edge, v21.03). When
|
||||||
|
|
|
@ -238,6 +238,22 @@ def migrate_work_folder():
|
||||||
migrate_success(context.config.work, 6)
|
migrate_success(context.config.work, 6)
|
||||||
current = 6
|
current = 6
|
||||||
|
|
||||||
|
if current == 6:
|
||||||
|
# Ask for confirmation
|
||||||
|
logging.info("Changelog:")
|
||||||
|
logging.info("* Major refactor for pmb 3.0.0")
|
||||||
|
logging.info("Migration will do the following:")
|
||||||
|
logging.info("* Zap your chroots")
|
||||||
|
if not pmb.helpers.cli.confirm():
|
||||||
|
raise RuntimeError("Aborted.")
|
||||||
|
|
||||||
|
# Zap chroots
|
||||||
|
pmb.chroot.zap(False)
|
||||||
|
|
||||||
|
# Update version file
|
||||||
|
migrate_success(context.config.work, 7)
|
||||||
|
current = 7
|
||||||
|
|
||||||
# Can't migrate, user must delete it
|
# Can't migrate, user must delete it
|
||||||
if current != required:
|
if current != required:
|
||||||
raise RuntimeError(
|
raise RuntimeError(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue