Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
devflow
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
devflow
Commits
1dae9911
Commit
1dae9911
authored
9 years ago
by
Nikos Skalkotos
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug in python to debian version translation
The "dev" string was translated to ~dev twice, leading to ~~dev.
parent
0bd729c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
devflow/versioning.py
+10
-1
10 additions, 1 deletion
devflow/versioning.py
with
10 additions
and
1 deletion
devflow/versioning.py
+
10
−
1
View file @
1dae9911
...
@@ -45,6 +45,8 @@ import os
...
@@ -45,6 +45,8 @@ import os
import
re
import
re
import
sys
import
sys
import
itertools
import
itertools
import
random
import
string
from
distutils
import
log
# pylint: disable=E0611
from
distutils
import
log
# pylint: disable=E0611
...
@@ -330,8 +332,15 @@ def debian_version_from_python_version(pyver):
...
@@ -330,8 +332,15 @@ def debian_version_from_python_version(pyver):
# This is the old format
# This is the old format
version
=
pyver
.
replace
(
"
_
"
,
"
~
"
).
replace
(
"
rc
"
,
"
~rc
"
)
version
=
pyver
.
replace
(
"
_
"
,
"
~
"
).
replace
(
"
rc
"
,
"
~rc
"
)
else
:
else
:
# Create a random string that will help as during replacing
rand
=
''
.
join
(
random
.
choice
(
string
.
ascii_uppercase
)
for
_
in
range
(
16
))
# Replace '.dev' or 'dev' with ~dev. This is needed to make the Debian
# develop version less than the non-develop one. Same thing for the rc
# one.
version
=
pyver
.
replace
(
version
=
pyver
.
replace
(
"
.dev
"
,
"
~dev
"
).
replace
(
"
dev
"
,
"
~dev
"
).
replace
(
"
rc
"
,
"
~rc
"
)
"
.dev
"
,
rand
).
replace
(
"
dev
"
,
"
~dev
"
).
replace
(
rand
,
'
~dev
'
).
replace
(
"
rc
"
,
"
~rc
"
)
codename
=
utils
.
get_distribution_codename
()
codename
=
utils
.
get_distribution_codename
()
minor
=
str
(
get_revision
(
version
,
codename
))
minor
=
str
(
get_revision
(
version
,
codename
))
return
version
+
"
-
"
+
minor
+
"
~
"
+
codename
return
version
+
"
-
"
+
minor
+
"
~
"
+
codename
...
...
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