Commit 3ccd0906 authored by Thomas Gambier's avatar Thomas Gambier 🚴🏼

grid: keep maximum information when pushing to shacache

We just relax the conditions to have an OS match.
parent a8f178a8
Pipeline #20316 failed with stage
in 0 seconds
...@@ -42,14 +42,18 @@ import distro ...@@ -42,14 +42,18 @@ import distro
def _debianize(os_): 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. minor releases would be seen as not compatible to each other.
* consider raspbian as debian
* don't use codename
""" """
distname, version, id_ = os_ distname, version, codename_ = os_
distname_lower = distname.lower() distname = distname.lower()
if distname_lower == 'debian' and '.' in version: if distname == 'raspbian':
distname = 'debian'
if distname == 'debian' and '.' in version:
version = version.split('.')[0] version = version.split('.')[0]
return distname_lower, version, id_ return distname, version, ''
def os_matches(os1, os2): def os_matches(os1, os2):
...@@ -59,8 +63,6 @@ def os_matches(os1, os2): ...@@ -59,8 +63,6 @@ def os_matches(os1, os2):
def distribution_tuple(): def distribution_tuple():
distname = distro.id() distname = distro.id()
version = distro.version() version = distro.version()
if distname == 'raspbian': codename = distro.codename()
distname = 'debian'
# we return something compatible with older platform.linux_distribution() # we return something compatible with older platform.linux_distribution()
# id (last field of the tuple) was always empty return distname, version, codename
return distname, version, ''
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment