]> git.donarmstrong.com Git - neurodebian.git/commitdiff
BF: call apt-key add explicitly for older Ubuntus
authorYaroslav Halchenko <debian@onerussian.com>
Thu, 27 Oct 2011 20:29:12 +0000 (16:29 -0400)
committerYaroslav Halchenko <debian@onerussian.com>
Thu, 27 Oct 2011 20:29:12 +0000 (16:29 -0400)
tools/nd_adddist

index f5aa64d6d5ce3f9727f36f2b1b42efb6de2c0783..04f281246969047faaa4748fa0a7acd935f19765 100755 (executable)
@@ -42,9 +42,17 @@ for a in i386 amd64; do
                --mirror "$mirror" \
                --debootstrapopts --arch=$a \
                --othermirror "deb http://neuro.debian.net/debian $dist main contrib non-free"
-       # deploy our key manually since archive with package is not yet
-       # available at this point
-       cp --preserve=mode {,${cow}}/etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg
+    # deploy our key manually since archive with package is not yet
+    # available at this point
+    mkdir -p ${cow}/etc/apt/trusted.gpg.d
+    cp --preserve=mode {,${cow}}/etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg
+    # Old ubuntus might not have capability to ready from that key yet,
+    # so we would need to manually add it
+    if [ $dist = 'karmic' ] || [ $dist = 'hardy' ]; then
+        chroot ${cow} bash -c "apt-get install -y --force-yes gnupg \
+        && /usr/bin/apt-key add /etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg \
+        && /usr/bin/apt-get update"
+    fi
   else
     cowbuilder --create --basepath ${cow} $opts \
                --components "$components" \