[debian-edu-commits] r82656 - in branches/wheezy/debian-edu-config: debian share/debian-edu-config/tools
pere at alioth.debian.org
pere at alioth.debian.org
Thu Nov 7 09:54:06 UTC 2013
Author: pere
Date: 2013-11-07 09:54:06 +0000 (Thu, 07 Nov 2013)
New Revision: 82656
Modified:
branches/wheezy/debian-edu-config/debian/changelog
branches/wheezy/debian-edu-config/share/debian-edu-config/tools/debian-edu-bless
Log:
Make debian-edu-bless more robust on flaky networks, by trying
several times to download packages while installing.
Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog 2013-10-25 10:17:47 UTC (rev 82655)
+++ branches/wheezy/debian-edu-config/debian/changelog 2013-11-07 09:54:06 UTC (rev 82656)
@@ -3,6 +3,8 @@
* Improve error message from sitesummary2ldapdhcp when serveral host
LDAP objects have the same MAC address, to make the problem easier
to debug.
+ * Make debian-edu-bless more robust on flaky networks, by trying
+ several times to download packages while installing.
-- Petter Reinholdtsen <pere at debian.org> Wed, 18 Sep 2013 14:35:10 +0200
Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/tools/debian-edu-bless
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/tools/debian-edu-bless 2013-10-25 10:17:47 UTC (rev 82655)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/debian-edu-bless 2013-11-07 09:54:06 UTC (rev 82656)
@@ -97,10 +97,10 @@
# 0. Install etckeeper, to keep track of changes in /etc/ (optional,
# highly recommended)
apt-get update
-apt-get install -y etckeeper
+apt_get_harder "apt-get install -y etckeeper"
# 1. Add skolelinux related APT sources.
-apt-get install -y debian-edu-archive-keyring
+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
@@ -119,10 +119,25 @@
if [ "true" = "$TESTINSTALL" ] ; then
echo 'TESTINSTALL="true"' >> /etc/debian-edu/config
fi
+apt_get_harder() {
+ aptcmd="$1"
+ # First download only, to detect problems with the network.
+ if $aptcmd --download-only ; then
+ :
+ else
+ echo "warning: downloading needed packages failed. trying again."
+ if $aptcmd --download-only ; then
+ :
+ else
+ echo "error: unable to download needed packages, tried twice"
+ fi
+ fi
+ $aptcmd
+}
# 3. Install debian-edu-install to load preseeding values and pull in
# our configuration.
-apt-get install -y debian-edu-install
+apt_get_harder "apt-get install -y debian-edu-install"
# 4. Preseed debconf database with profile setup in
# /etc/debian-edu/config, and run tasksel to install packages
@@ -139,20 +154,9 @@
aptcmd=$(tasksel --new-install -t | sed 's/debconf-apt-progress -- //')
-# First download only, to detect problems with the network.
-if $aptcmd --download-only ; then
+if DEBIAN_PRIORITY=critical apt_get_harder $aptcmd ; then
:
else
- echo "warning: downloading needed packages failed. trying again."
- if $aptcmd --download-only ; then
- :
- else
- echo "error: unable to download needed packages, tried twice"
- fi
-fi
-if DEBIAN_PRIORITY=critical $aptcmd ; then
- :
-else
remove_tasksel_overrides
echo "error: installing packages failed"
exit 1
More information about the debian-edu-commits
mailing list