From c4069bff8b205003e3a97111338694df1c41e140 Mon Sep 17 00:00:00 2001
From: Hugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
Date: Wed, 8 Aug 2018 16:06:08 -0400
Subject: [PATCH] packaging: fix oci regression (s/$OS/$ID/)

f737fa7b introduced a major regression breaking ring-all's oci
feature: incorrect $OS variable was used instead of $ID.

Change-Id: Ice1866affa649cf7d3f560a9cb6d4a25ea5c1551
Reviewed-by: Sebastien Blin <sebastien.blin@savoirfairelinux.com>
---
 packaging/rules/debian/ring-all.postinst | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/packaging/rules/debian/ring-all.postinst b/packaging/rules/debian/ring-all.postinst
index b3e3d5da..0aabb1ae 100755
--- a/packaging/rules/debian/ring-all.postinst
+++ b/packaging/rules/debian/ring-all.postinst
@@ -95,19 +95,19 @@ if [ -f /etc/os-release ]; then
     . /etc/os-release
 
     # Set-up Ring PPA end tag
-    if [ "$OS" = "debian" ] && [ "$VER" = "9" ]; then
+    if [ "$ID" = "debian" ] && [ "$VER" = "9" ]; then
         ENDTAG="${ID}_${VERSION_ID}"
-    elif [ "$OS" = "ubuntu" ] && [ "$VER" = "16.04" ]; then
+    elif [ "$ID" = "ubuntu" ] && [ "$VER" = "16.04" ]; then
         ENDTAG="${ID}_${VERSION_ID}"
-    elif [ "$OS" = "ubuntu" ] && [ "$VER" = "17.04" ]; then
+    elif [ "$ID" = "ubuntu" ] && [ "$VER" = "17.04" ]; then
         ENDTAG="${ID}_${VERSION_ID}"
-    elif [ "$OS" = "ubuntu" ] && [ "$VER" = "17.10" ]; then
+    elif [ "$ID" = "ubuntu" ] && [ "$VER" = "17.10" ]; then
         ENDTAG="${ID}_${VERSION_ID}"
-    elif [ "$OS" = "ubuntu" ] && [ "$VER" = "18.04" ]; then
+    elif [ "$ID" = "ubuntu" ] && [ "$VER" = "18.04" ]; then
         ENDTAG="${ID}_${VERSION_ID}"
-    elif [ "$OS" = "linuxmint" ] && [ "$UBUNTU_CODENAME" = "xenial" ]; then
+    elif [ "$ID" = "linuxmint" ] && [ "$UBUNTU_CODENAME" = "xenial" ]; then
         ENDTAG="ubuntu_16.04"
-    elif [ "$OS" = "linuxmint" ] && [ "$UBUNTU_CODENAME" = "bionic" ]; then
+    elif [ "$ID" = "linuxmint" ] && [ "$UBUNTU_CODENAME" = "bionic" ]; then
         ENDTAG="ubuntu_18.04"
     else
         # Distribution is not supported. Don't provide automatic updates.
-- 
GitLab