[debian-edu-commits] debian-edu/ 01/01: Adjust debian-edu-bless to only enable our local mirror if it exist, to fix broken debian-edu test.

Petter Reinholdtsen pere at moszumanska.debian.org
Tue Oct 7 08:44:52 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository debian-edu-config.

commit ed4940c5ccfbb73787e119e44fe05b9dffc23b6e
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Tue Oct 7 10:44:49 2014 +0200

    Adjust debian-edu-bless to only enable our local mirror if it exist, to fix broken debian-edu test.
---
 debian/changelog                               |  2 ++
 share/debian-edu-config/tools/debian-edu-bless | 18 ++++++++++++------
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index fbc9557..a7c2b2e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ debian-edu-config (1.809) UNRELEASED; urgency=low
     to find it.
   * Log an error if cfengine return failure, to make it easier to
     discover if it ever happen.
+  * Adjust debian-edu-bless to only enable our local mirror if it exist,
+    to fix broken debian-edu test.
 
  -- Petter Reinholdtsen <pere at debian.org>  Tue, 07 Oct 2014 08:07:03 +0200
 
diff --git a/share/debian-edu-config/tools/debian-edu-bless b/share/debian-edu-config/tools/debian-edu-bless
index 76ba617..351d1cc 100644
--- a/share/debian-edu-config/tools/debian-edu-bless
+++ b/share/debian-edu-config/tools/debian-edu-bless
@@ -92,13 +92,19 @@ apt_get_harder() {
 apt-get update
 apt_get_harder "apt-get install -y etckeeper"
 
-# 1. Add skolelinux related APT sources.
-apt_get_harder "apt-get install -y debian-edu-archive-keyring"
-cat <<EOF >/etc/apt/sources.list.d/debian-edu.list
-deb http://ftp.skolelinux.org/skolelinux $EDUSUITE local
-deb-src http://ftp.skolelinux.org/skolelinux $EDUSUITE local
+# 1. Add skolelinux related APT sources if it exist
+MIRROR=ftp.skolelinux.org
+DIRECTORY=/skolelinux
+sourcefile=/etc/apt/sources.list.d/debian-edu.list
+if wget -qO - http://$MIRROR$DIRECTORY/dists/$EDUSUITE/Release | grep -q " local/binary" ; then 
+    echo "info: Enabling our local APT source from $MIRROR."
+    apt_get_harder "apt-get install -y debian-edu-archive-keyring"
+    cat <<EOF > $sourcefile
+deb http://$MIRROR$DIRECTORY $EDUSUITE local
+deb-src http://$MIRROR$DIRECTORY $EDUSUITE local
 EOF
-apt-get update
+    apt-get update
+fi
 
 # 2. Create /etc/debian-edu/config with the wanted configuration.
 mkdir -p /etc/debian-edu

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/debian-edu-config.git



More information about the debian-edu-commits mailing list