From bddc1a20ba0de80020a09883da0a369a595b13e1 Mon Sep 17 00:00:00 2001
From: Alexander Schlarb <alexander@ninetailed.ninja>
Date: Fri, 13 Dec 2019 16:02:46 +0100
Subject: [PATCH] make-ring: Do not reject the Flatpak-based GNOME runtime
 distro

Change-Id: Iaa877418ef423ab427011d7abae8a837ed643346
---
 make-ring.py | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/make-ring.py b/make-ring.py
index 91ee97de..4f9b3488 100755
--- a/make-ring.py
+++ b/make-ring.py
@@ -44,6 +44,10 @@ ZYPPER_BASED_DISTROS = [
     'opensuse-leap',
 ]
 
+FLATPAK_BASED_RUNTIMES = [
+    'org.gnome.Platform',
+]
+
 APT_INSTALL_SCRIPT = [
     'apt-get update',
     'apt-get install -y %(packages)s'
@@ -394,13 +398,16 @@ def validate_args(parsed_args):
     """Validate the args values, exit if error is found"""
 
     # Check arg values
-    supported_distros = [ANDROID_DISTRIBUTION_NAME, OSX_DISTRIBUTION_NAME, IOS_DISTRIBUTION_NAME,
-                         WIN32_DISTRIBUTION_NAME] + APT_BASED_DISTROS + DNF_BASED_DISTROS + PACMAN_BASED_DISTROS + ZYPPER_BASED_DISTROS
+    supported_distros = [
+        ANDROID_DISTRIBUTION_NAME, OSX_DISTRIBUTION_NAME, IOS_DISTRIBUTION_NAME,
+        WIN32_DISTRIBUTION_NAME
+    ] + APT_BASED_DISTROS + DNF_BASED_DISTROS + PACMAN_BASED_DISTROS \
+      + ZYPPER_BASED_DISTROS + FLATPAK_BASED_RUNTIMES
 
     if parsed_args.distribution not in supported_distros:
-        print('Distribution \''+parsed_args.distribution+'\' not supported.\nChoose one of: %s'
-              % ', '.join(supported_distros),
-              file=sys.stderr)
+        print('Distribution \'{0}\' not supported.\nChoose one of: {1}'.format(
+            parsed_args.distribution, ', '.join(supported_distros)
+        ), file=sys.stderr)
         sys.exit(1)
 
 
-- 
GitLab