From: Yaroslav Halchenko Date: Thu, 14 Aug 2014 17:31:15 +0000 (-0400) Subject: Improve error msg and adjust test for now "high" priority for enable question --... X-Git-Url: https://git.donarmstrong.com/?p=neurodebian.git;a=commitdiff_plain;h=eda48f271898435920fead35ac3286a6385698da Improve error msg and adjust test for now "high" priority for enable question -- passed on sid docker --- diff --git a/debian/neurodebian.config b/debian/neurodebian.config index 1c4ffe3..572eedc 100755 --- a/debian/neurodebian.config +++ b/debian/neurodebian.config @@ -37,7 +37,7 @@ while [ "$STATE" != 0 -a "$STATE" -lt 9 ]; do case "${NEURODEBIAN_ENABLE}" in true|yes|YES|1) enable=true;; false|no|NO|0) enable=false;; - *) echo "Non-supported value $NEURODEBIAN_ENABLE of NEURODEBIAN_ENABLE env variable. Use yes or no" >&2; + *) echo "ERROR: Non-supported value $NEURODEBIAN_ENABLE of NEURODEBIAN_ENABLE env variable. Use yes or no" >&2; exit 1;; esac db_set neurodebian/enable $enable diff --git a/tools/tests/test_neurodebian-repository-deployment b/tools/tests/test_neurodebian-repository-deployment index 48f2f94..2bd99e5 100755 --- a/tools/tests/test_neurodebian-repository-deployment +++ b/tools/tests/test_neurodebian-repository-deployment @@ -20,7 +20,12 @@ apt-get install -y dpkg-dev ; dpkg-scanpackages . /dev/null > Packages # Add it to the list of available echo "deb file:///tmp/apt ./" >| $apt_file; apt-get update # Install the beast -apt-get install -y --allow-unauthenticated neurodebian +DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated neurodebian +# By default should not get enabled +[ ! -e "$apt_nd_file" ] + +DEBIAN_FRONTEND=noninteractive NEURODEBIAN_ENABLE=yes apt-get install -y --allow-unauthenticated --reinstall neurodebian + # Verify that it has correct entries # Very cruel way to figure out the default release. Would fail if # options, such as multiarch, are specified after deb