[Emdebian-logs] [SCM] Root filesystem generation tool (multistrap wrapper) branch, master, updated. edfb6e34e1dcc771abebe61a7f8911392a074c83

josch josch at pyneo.org
Thu Mar 15 10:25:32 UTC 2012


The following commit has been merged in the master branch:
commit edfb6e34e1dcc771abebe61a7f8911392a074c83
Author: josch <josch at pyneo.org>
Date:   Thu Mar 15 11:25:22 2012 +0100

    add new option to ignore errors during processing

diff --git a/polystrap.sh b/polystrap.sh
index 3f4f279..fe0a65a 100755
--- a/polystrap.sh
+++ b/polystrap.sh
@@ -23,8 +23,6 @@
 # FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 # IN THE SOFTWARE.
 
-set -e
-
 usage() {
 	echo "Usage: $0: [-f] [-v] [-n] [-s suite] [-a arch] [-d directory] [-m mirror] [-p packages] platform\n" >&2
 }
@@ -40,7 +38,8 @@ fi
 
 FORCE=""
 MSTRAP_SIM=
-while getopts fvs:a:d:m:p:n opt; do
+EXIT_ON_ERROR=true
+while getopts efvs:a:d:m:p:n opt; do
 	case $opt in
 	s) _SUITE="$OPTARG";;
 	a) _ARCH="$OPTARG";;
@@ -48,6 +47,7 @@ while getopts fvs:a:d:m:p:n opt; do
 	m) _MIRROR="$OPTARG";;
 	p) _PACKAGES="$OPTARG";;
 	n) MSTRAP_SIM="--simulate";;
+	e) EXIT_ON_ERROR=false;;
 	v) set -x;;
 	f) FORCE=true;;
 	?) usage; exit 1;;
@@ -57,6 +57,8 @@ shift $(($OPTIND - 1))
 
 [ "$#" -ne 1 ] && { echo "too many positional arguments" >&2; usage; exit 1; }
 
+[ "$EXIT_ON_ERROR" = true ] && set -e
+
 BOARD="$1"
 
 [ ! -r "$BOARD" ] && { echo "cannot find target directory: $BOARD" >&2; exit 1; }
@@ -148,8 +150,6 @@ fi
 
 # run preinst scripts
 for script in $ROOTDIR/var/lib/dpkg/info/*.preinst; do
-	#[ "$script" = "$ROOTDIR/var/lib/dpkg/info/bash.preinst" ] && continue
-	#[ "$script" = "$ROOTDIR/var/lib/dpkg/info/module-init-tools.preinst" ] && continue
 	[ "$script" = "$ROOTDIR/var/lib/dpkg/info/vpnc.preinst" ] && continue
 	echo "I: run preinst script ${script##$ROOTDIR}"
 	DPKG_MAINTSCRIPT_NAME=preinst \

-- 
Root filesystem generation tool (multistrap wrapper)



More information about the Emdebian-logs mailing list