[neon/neon/keyring/Neon/release] debian: make the logic work

Carlos De Maine null at kde.org
Thu Sep 26 14:13:16 BST 2024


Git commit a1ce263b9d6548621b95439540bcf086cbc53d6f by Carlos De Maine.
Committed on 26/09/2024 at 13:13.
Pushed by carlosdem into branch 'Neon/release'.

make the logic work

M  +14   -11   debian/neon-keyring.postinst

https://invent.kde.org/neon/neon/keyring/-/commit/a1ce263b9d6548621b95439540bcf086cbc53d6f

diff --git a/debian/neon-keyring.postinst b/debian/neon-keyring.postinst
index 29d6c2e..cdd3de5 100644
--- a/debian/neon-keyring.postinst
+++ b/debian/neon-keyring.postinst
@@ -5,26 +5,29 @@ set -ex
 ARCH=$(dpkg --print-architecture)
 SUITE=$(grep DISTRIB_CODENAME= /etc/lsb-release | grep -oP '(?<=DISTRIB_CODENAME=).*')
 # populate NEONARCHIVE var
+# user edition with guards for release edition testing iso's
 NEONARCHIVE_USER=$(grep -o User /etc/lsb-release | tr '[:upper:]' '[:lower:]' )
 if [ "$NEONARCHIVE_USER" = "user" ];
     then NEONARCHIVE=$NEONARCHIVE_USER;
+	# guard against release edition testing setups
+	if [ -e /etc/apt/sources.list.d/neon.sources ]; then
+		NEONARCHIVE_RELEASE=$(grep -o http://archive.neon.kde.org/release /etc/apt/sources.list.d/neon.sources)
+	elif [ -e /etc/apt/sources.list.d/neon.list ]; then
+		NEONARCHIVE_RELEASE=$(grep -o -m 1 http://archive.neon.kde.org/release /etc/apt/sources.list.d/neon.list)
+	fi
+	if [ "$NEONARCHIVE_RELEASE" = "http://archive.neon.kde.org/release" ];
+		then NEONARCHIVE="release";
+	fi
 fi
-# guard against release edition testing setups
-if [ -e /etc/apt/sources.list.d/neon.sources ]; then
-	NEONARCHIVE_RELEASE=$(grep -o http://archive.neon.kde.org/release /etc/apt/sources.list.d/neon.sources)
-elif [ -e /etc/apt/sources.list.d/neon.list ]; then
-	NEONARCHIVE_RELEASE=$(grep -o -m 1 http://archive.neon.kde.org/release /etc/apt/sources.list.d/neon.list)
-fi
-if [ "$NEONARCHIVE_RELEASE" = "http://archive.neon.kde.org/release" ];
-    then NEONARCHIVE="release";
-fi
+# testing edition (in the future will need guards for stable edition testing iso's)
 NEONARCHIVE_TESTING=$(grep -o Testing /etc/lsb-release | tr '[:upper:]' '[:lower:]' )
 if [ "$NEONARCHIVE_TESTING" = "testing" ];
-    then NEONARCHIVE=$NEONARCHIVE_TESTING;
+	then NEONARCHIVE=$NEONARCHIVE_TESTING;
 fi
+# unstable edition
 NEONARCHIVE_UNSTABLE=$(grep -o Unstable /etc/lsb-release | tr '[:upper:]' '[:lower:]' )
 if [ "$NEONARCHIVE_UNSTABLE" = "unstable" ];
-    then NEONARCHIVE=$NEONARCHIVE_UNSTABLE;
+	then NEONARCHIVE=$NEONARCHIVE_UNSTABLE;
 fi
 
 # move apt-key master key back to where it belongs if it was previously moved in unstable


More information about the Neon-commits mailing list