summaryrefslogtreecommitdiff
path: root/helpers/lh_bootstrap_cdebootstrap
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-09-23 10:04:48 +0200
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:18:28 +0100
commit799d4bfb31c279b72088c8ee8a16c2710ab8a309 (patch)
tree4bbc1758ceaa46c5e81fe9d66ccdaacfec047ef8 /helpers/lh_bootstrap_cdebootstrap
parent677415f6d7efc1e5b888570d70af311d2900c69c (diff)
downloadlive-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.zip
live-build-799d4bfb31c279b72088c8ee8a16c2710ab8a309.tar.gz
Adding live-helper 1.0~a3-1.
Diffstat (limited to 'helpers/lh_bootstrap_cdebootstrap')
-rwxr-xr-xhelpers/lh_bootstrap_cdebootstrap60
1 files changed, 39 insertions, 21 deletions
diff --git a/helpers/lh_bootstrap_cdebootstrap b/helpers/lh_bootstrap_cdebootstrap
index e4b83a2..b6ea6b9 100755
--- a/helpers/lh_bootstrap_cdebootstrap
+++ b/helpers/lh_bootstrap_cdebootstrap
@@ -1,6 +1,11 @@
#!/bin/sh
# lh_bootstrap_cdebootstrap(1) - bootstrap a Debian system with cdebootstrap(1)
+# Copyright (C) 2006-2007 Daniel Baumann <daniel@debian.org>
+#
+# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
+# This is free software, and you are welcome to redistribute it
+# under certain conditions; see COPYING for details.
set -e
@@ -10,6 +15,13 @@ do
. ${FUNCTION}
done
+# Set static variables
+DESCRIPTION="bootstrap a Debian system with cdebootstrap(1)"
+HELP=""
+USAGE="${PROGRAM} [--force]"
+
+Arguments "${@}"
+
# Ensure that a system is built as root
lh_testroot
@@ -44,26 +56,26 @@ then
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --suite-config=${LIVE_DISTRIBUTION_CONFIG}"
fi
-if [ "${LIVE_FLAVOUR}" = "mini" ] || [ "${LIVE_FLAVOUR}" = "minimal" ] || [ "${LIVE_FLAVOUR}" = "minimal-net" ]
+if [ "${LIVE_PACKAGES_LISTS}" != "minimal" ] && [ "${LIVE_PACKAGES_LISTS}" != "mini" ]
then
- CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
-else
CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=standard"
+else
+ CDEBOOTSTRAP_OPTIONS="${CDEBOOTSTRAP_OPTIONS} --flavour=minimal"
fi
if [ -x "/usr/bin/cdebootstrap" ]
then
- # Restore old cache
- if [ -d cache/bootstrap ]
- then
- mkdir -p chroot/var/cache/bootstrap
- cp cache/bootstrap/*.deb chroot/var/cache/bootstrap
- fi
-
if [ "${LH_CACHE}" = "enabled" ]
then
+ # Restore old cache
+ if [ -d cache/bootstrap ]
+ then
+ mkdir -p chroot/var/cache/bootstrap
+ cp cache/bootstrap/*.deb chroot/var/cache/bootstrap
+ fi
+
# Executing cdebootstrap (download-only)
- cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}"
+ cdebootstrap ${CDEBOOTSTRAP_OPTIONS} --download-only "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}"
# Removing old cache
if [ -d cache/bootstrap ]
@@ -81,17 +93,23 @@ then
fi
# Executing cdebootstrap (regular run)
- cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_LOCAL}"
+ cdebootstrap ${CDEBOOTSTRAP_OPTIONS} "${LIVE_DISTRIBUTION}" chroot "${LIVE_MIRROR_BUILD}"
+
+ # Remove cdebootstrap-helper-diverts (needed at least for minimal flavours)
+ if [ "${LIVE_BOOTSTRAP_FLAVOUR}" = "minimal" ] || [ "${LIVE_BOOTSTRAP_FLAVOUR}" = "mini" ]
+ then
+ Chroot "dpkg -P cdebootstrap-helper-diverts"
+ fi
+
+ # Removing bootstrap cache
+ if [ -d chroot/var/cache/bootstrap ]
+ then
+ rm -rf chroot/var/cache/bootstrap
+ fi
+
+ # Creating stage file
+ Create_stagefile .stage/bootstrap
else
echo "E: Can't process file /usr/bin/cdebootstrap (FIXME)"
exit 1
fi
-
-# Removing bootstrap cache
-if [ -d chroot/var/cache/bootstrap ]
-then
- rm -rf chroot/var/cache/bootstrap
-fi
-
-# Creating stage file
-Create_stagefile .stage/bootstrap