[debian-edu-commits] debian-edu/ 01/01: Make LTSP mirror editing more robust. Do not add corrupt APT source when no dist value is set and only add our local mirror if it exist.

Petter Reinholdtsen pere at moszumanska.debian.org
Thu Oct 23 08:30:39 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 f37ab979f9fe647ed1328b340a1193a1e3a92678
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Oct 23 10:30:33 2014 +0200

    Make LTSP mirror editing more robust.  Do not add corrupt APT source when no dist value is set and only add our local mirror if it exist.
---
 debian/changelog                                              |  7 +++++++
 .../ltsp-build-client/Debian-custom/000-arch-detection        | 11 +++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 49b5733..96f6bed 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+debian-edu-config (1.813) UNRELEASED; urgency=low
+
+  * Make LTSP mirror editing more robust.  Do not add corrupt APT source
+    when no dist value is set and only add our local mirror if it exist.
+
+ -- Petter Reinholdtsen <pere at debian.org>  Thu, 23 Oct 2014 10:30:10 +0200
+
 debian-edu-config (1.812) unstable; urgency=low
 
   [ Petter Reinholdtsen ]
diff --git a/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection b/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
index a761727..e506344 100644
--- a/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
+++ b/share/ltsp/plugins/ltsp-build-client/Debian-custom/000-arch-detection
@@ -5,6 +5,11 @@ case $MODE in
     if [ "$ARCH" = "amd64" ]; then
 	ARCH=i386
 
+	if [ -z "$option_dist_value" ] ; then
+	    option_dist_value=$(debian-edu-current-codename)
+	    echo "info: Missing LTSP dist value, setting to $option_dist_value"
+	fi
+
 	# Force network APT source for the netinst CD, as the i386
 	# binaries are missing on the CD.
 	if [ file:///media/cdrom = "$option_mirror_value" ] ; then
@@ -14,8 +19,10 @@ case $MODE in
 		NEWMIRROR=$(awk '/^deb (http|ftp):\/\/.* main/ { if (!first) { print $2; first=1 } }' < /etc/apt/sources.list)
 		echo "info: Changing LTSP mirror from '$option_mirror_value' to '$NEWMIRROR'"
 		option_mirror_value=$NEWMIRROR
-		option_extra_mirror_value="http://ftp.skolelinux.org/skolelinux/ $option_dist_value local"
-		echo "info: Added LTSP extra mirror '$option_extra_mirror_value'"
+		if wget -qO - http://ftp.skolelinux.org/skolelinux/dists/$option_dist_value/Release | grep -q " local/binary" ; then 
+		    option_extra_mirror_value="http://ftp.skolelinux.org/skolelinux/ $option_dist_value local"
+		    echo "info: Added LTSP extra mirror '$option_extra_mirror_value'"
+		fi
 		NEWCOMPONENTS=$(echo $option_components_value | sed -r -e 's/(,local|local,)//')
 		echo "info: Removing 'local' from components for other mirrors"
 		option_components_value=$NEWCOMPONENTS

-- 
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