Commit f737fa7b authored by Hugo Lefeuvre's avatar Hugo Lefeuvre Committed by Adrien Béraud

packaging: fix issues with oci on Linux Mint

ring-all automatically registers

dl.ring.cx/ring-nightly/{id}_{version_id}

(id and version_id from os-release) as a trusted source. This is
perfectly fine as long as the package is installed on an officially
supported system, but if the package is installed on an unsupported
system (e.g. Linux Mint) the installed source will be wrong even if
even if the package is expected to work.

This patch addresses this issue by adding if else if else statements
handling all possible cases. This is not as pretty as before but it
makes sure we handle all cases properly.

Change-Id: I25167e013c56b212f7d59275419921cd0732de17
Gitlab: #490
parent c79ae4d4
......@@ -93,10 +93,27 @@ CAN_ADD_DEB_SOURCE=true
# the case then we simply don't want to provide automatic updates
if [ -f /etc/os-release ]; then
. /etc/os-release
# Set-up Ring PPA end tag
ENDTAG="${ID}_${VERSION_ID}"
if [ "$OS" = "debian" ] && [ "$VER" = "9" ]; then
ENDTAG="${ID}_${VERSION_ID}"
elif [ "$OS" = "ubuntu" ] && [ "$VER" = "16.04" ]; then
ENDTAG="${ID}_${VERSION_ID}"
elif [ "$OS" = "ubuntu" ] && [ "$VER" = "17.04" ]; then
ENDTAG="${ID}_${VERSION_ID}"
elif [ "$OS" = "ubuntu" ] && [ "$VER" = "17.10" ]; then
ENDTAG="${ID}_${VERSION_ID}"
elif [ "$OS" = "ubuntu" ] && [ "$VER" = "18.04" ]; then
ENDTAG="${ID}_${VERSION_ID}"
elif [ "$OS" = "linuxmint" ] && [ "$UBUNTU_CODENAME" = "xenial" ]; then
ENDTAG="ubuntu_16.04"
elif [ "$OS" = "linuxmint" ] && [ "$UBUNTU_CODENAME" = "bionic" ]; then
ENDTAG="ubuntu_18.04"
else
# Distribution is not supported. Don't provide automatic updates.
CAN_ADD_DEB_SOURCE=false
fi
else
# Distribution is not supported. Don't provide automatic updates.
CAN_ADD_DEB_SOURCE=false
fi
......
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