Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
slapos.core
Commits
3ccd0906
Commit
3ccd0906
authored
Mar 22, 2022
by
Thomas Gambier
🚴🏼
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grid: keep maximum information when pushing to shacache
We just relax the conditions to have an OS match.
parent
a8f178a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
9 deletions
+11
-9
slapos/grid/distribution.py
slapos/grid/distribution.py
+11
-9
No files found.
slapos/grid/distribution.py
View file @
3ccd0906
...
...
@@ -42,14 +42,18 @@ import distro
def
_debianize
(
os_
):
"""
keep only the major release number in case of debian, otherwise
*
keep only the major release number in case of debian, otherwise
minor releases would be seen as not compatible to each other.
* consider raspbian as debian
* don't use codename
"""
distname
,
version
,
id_
=
os_
distname_lower
=
distname
.
lower
()
if
distname_lower
==
'debian'
and
'.'
in
version
:
distname
,
version
,
codename_
=
os_
distname
=
distname
.
lower
()
if
distname
==
'raspbian'
:
distname
=
'debian'
if
distname
==
'debian'
and
'.'
in
version
:
version
=
version
.
split
(
'.'
)[
0
]
return
distname
_lower
,
version
,
id_
return
distname
,
version
,
''
def
os_matches
(
os1
,
os2
):
...
...
@@ -59,8 +63,6 @@ def os_matches(os1, os2):
def
distribution_tuple
():
distname
=
distro
.
id
()
version
=
distro
.
version
()
if
distname
==
'raspbian'
:
distname
=
'debian'
codename
=
distro
.
codename
()
# we return something compatible with older platform.linux_distribution()
# id (last field of the tuple) was always empty
return
distname
,
version
,
''
return
distname
,
version
,
codename
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment