Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
pmbootstrap
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
postmarketOS
pmbootstrap
Commits
3ead8f88
Unverified
Commit
3ead8f88
authored
5 months ago
by
Oliver Smith
Browse files
Options
Downloads
Patches
Plain Diff
migrate_work_folder: print suffix in migration msg (MR 2460)
parent
60cae581
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2460
migrate_work_folder: print suffix "-2.x" and skip updating the git URL twice
Pipeline
#209069
passed
5 months ago
Stage: lint
Stage: deploy
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pmb/helpers/other.py
+4
-2
4 additions, 2 deletions
pmb/helpers/other.py
with
4 additions
and
2 deletions
pmb/helpers/other.py
+
4
−
2
View file @
3ead8f88
...
...
@@ -83,12 +83,14 @@ def migrate_work_folder():
context
=
get_context
()
current
=
0
suffix
:
str
|
None
=
None
current_with_suffix
=
""
path
=
context
.
config
.
work
/
"
version
"
if
os
.
path
.
exists
(
path
):
with
open
(
path
)
as
f
:
# pmb 2.3.x added a suffix due to conflicting work versions
# We need to be able to handle that going forward
version_parts
=
f
.
read
().
rstrip
().
split
(
"
-
"
)
current_with_suffix
=
f
.
read
().
rstrip
()
version_parts
=
current_with_suffix
.
split
(
"
-
"
)
current
=
int
(
version_parts
[
0
])
if
len
(
version_parts
)
==
2
:
suffix
=
version_parts
[
1
]
...
...
@@ -99,7 +101,7 @@ def migrate_work_folder():
return
logging
.
info
(
"
WARNING: Your work folder version needs to be migrated
"
"
(from version
"
+
str
(
current
)
+
"
to
"
+
str
(
required
)
+
"
)!
"
f
"
(from version
{
current_with_suffix
}
to
{
required
}
)!
"
)
# version 6 and version 7 from 2.3.x branch are equivalent for this and we need to migrate
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment