migrate_work_folder: 7-2.x: skip update git url 2x (MR 2460)

Don't update the git URL again when coming from 7-2.x where this step
was already done. This didn't fail, but was potentially confusing for
the user since the git URLs were already upgraded from 7 -> 7-2x.
This commit is contained in:
Oliver Smith 2024-10-27 12:12:41 +01:00
parent 50321d41f6
commit 60cae5811b
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB

View file

@ -116,8 +116,14 @@ def migrate_work_folder():
pmb.chroot.zap(False)
# Update version file
migrate_success(context.config.work, 7)
current = 7
if suffix == "2.x":
# If we come from 7-2.x, then we already updated the git urls and
# can skip the 7->8 migration step
migrate_success(context.config.work, 8)
current = 8
else:
migrate_success(context.config.work, 7)
current = 7
if current == 7:
# Ask for confirmation