Update install_osm.sh to solve the issue with no valid OpenPGP data found 04/11904/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 20 Apr 2022 22:29:02 +0000 (00:29 +0200)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Fri, 22 Apr 2022 11:06:28 +0000 (13:06 +0200)
Change-Id: Ife80b72991b27c55f2f254b2723a253172e38cc9
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
installers/install_osm.sh

index 532f97d..8863297 100755 (executable)
@@ -101,9 +101,12 @@ add_repo() {
       || sudo apt-get install -y $need_packages_lw \
       || ! echo "failed to install $need_packages_lw" \
       || exit 1
-    wget -qO - "$REPOSITORY_BASE/$RELEASE/OSM%20ETSI%20Release%20Key.gpg" | sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE apt-key add -
+    wget -q -O OSM-ETSI-Release-key.gpg "$REPOSITORY_BASE/$RELEASE/OSM%20ETSI%20Release%20Key.gpg"
+    sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 apt-key add OSM-ETSI-Release-key.gpg \
+      || ! echo -e "Could not add GPG key $REPOSITORY_BASE/$RELEASE/OSM%20ETSI%20Release%20Key.gpg" \
+      || exit 1
     sudo DEBIAN_FRONTEND=noninteractive add-apt-repository -y "$1"
-    sudo APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=1 DEBIAN_FRONTEND=noninteractive apt-get -y update
+    sudo DEBIAN_FRONTEND=noninteractive apt-get -y update
     return 0
   fi