echo "I: success"
*** ~/bin/docker-debians-run /bin/bash -c "apt-get -y update >/dev/null; apt-get install -y wget >/dev/null; bash <(wget -q --no-check-certificate -O- https://raw.githubusercontent.com/yarikoptic/neurodebian/enh/neurodebian-installer/tools/nd-configurerepo) --overwrite --install --mirror=us-nh"
-
-* TODO use NEURODEBIAN_ENABLE env variable in postinst, add explicit option
- moved virtualbox-guest* dependencies into Depends (from
Pre-Depends), and stripping deprecated -ose suffix
- dropped depends on elderly gdm, now lightdm or any x-display-manager
- - fixing package names for chromium, and removing update-manager-gnome
- N/A in sid
+ - fixing package names for chromium, and removing update-manager-gnome
+ N/A in sid
* debian/neurodebian-popularity-contest.*
- .postinst should try to remove old-fashion popcon entry only if
upgrading/configuring from pre 0.33 version of neurodebian-*
- use long GPG key id
- unify prefix for environment variables to be NEURODEBIAN_ instead of
more cryptic ND_AE_
+ * tools/neurodebian.{preinst,templates,config}
+ - add an explicit question either NeuroDebian APT configuration should
+ be installed (i.e. NeuroDebian repository being enabled). debconf
+ default/value could be overriden from the environment using
+ NEURODEBIAN_ENABLE.
-- Yaroslav Halchenko <debian@onerussian.com> Wed, 13 Aug 2014 13:43:13 -0400
# This implements a simple state machine so the back button can be handled.
# taken from debconf demo example
STATE=1
-while [ "$STATE" != 0 -a "$STATE" != 8 ]; do
+while [ "$STATE" != 0 -a "$STATE" -lt 9 ]; do
case $STATE in
- 1)
+ 1)
+ # allow to be overriden by environment variable as discussed with
+ # ftpmaster
+ if [ ! -z "${NEURODEBIAN_ENABLE:-}" ]; then
+ 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;
+ exit 1;;
+ esac
+ db_set neurodebian/enable $enable
+ fi
+ db_input medium neurodebian/enable || true
+ ;;
+ 2)
neurodebian_releases="$(ND_IFS=', ' nd-configurerepo --print-releases)"
debian_release="$(ND_IFS=', ' nd-configurerepo --print-release)"
if [ -z "$debian_release" ]; then # just a failover
db_subst neurodebian/release release "$debian_release"
db_input medium neurodebian/release || true
;;
- 2)
+ 3)
neurodebian_mirrors="$(ND_IFS=', ' nd-configurerepo --print-mirrors)"
debug "mirrors: $neurodebian_mirrors"
db_subst neurodebian/mirror mirrors "$neurodebian_mirrors"
mirror_selection_ret="$RET"
debug "mirror select return: <$mirror_selection_ret>"
;;
- 3) neurodebian_flavor="$(ND_IFS=', ' nd-configurerepo --print-flavor)"
+ 4) neurodebian_flavor="$(ND_IFS=', ' nd-configurerepo --print-flavor)"
db_subst neurodebian/flavor flavor "$neurodebian_flavor"
db_input medium neurodebian/flavor || true ;;
- 4) db_input medium neurodebian/components || true ;;
- 5) db_input low neurodebian/overwrite || true ;;
+ 5) db_input medium neurodebian/components || true ;;
6) db_input low neurodebian/suffix || true ;;
- 7) db_input medium neurodebian/run-update-note || true ;;
+ 7) db_input low neurodebian/overwrite || true ;;
+ 8) db_input medium neurodebian/run-update-note || true ;;
esac
if db_go; then
+ case $STATE in
+ 1)
+ db_get neurodebian/enable # get new value
+ if [ "$RET" = "false" ]; then
+ # no need to proceed with further questions
+ if /bin/ls /etc/apt/sources.list.d/neurodebian.sources*.list &>/dev/null; then
+ # we have configuration present -- display a note about apt-get update
+ STATE=8
+ else
+ STATE=100 # just go out -- nothing to do, nothing to inform about
+ fi
+ continue
+ fi;;
# Ubuntus managed to remove netselect "to accompany apt-netselect"
# https://bugs.launchpad.net/ubuntu/+source/netselect/+bug/337377
# So for now remove this mandatory demanding of netselect for "best", and
# rely on logic in nd-configurerepo to select default mirror (currently origin)
# as the 'best'
#
-# case $STATE in
-# 2)
+# 3)
# db_metaget neurodebian/mirror value
# selected_mirror="$RET"
# # TODOs:
# continue;
# fi
# fi
-# esac
+ esac
STATE=$(($STATE + 1))
else
STATE=$(($STATE - 1))
case "$1" in
configure)
- # obtain all the options and call nd-configurerepo
- opts="--do-not-update"
- db_get neurodebian/release; [ "$RET" = "auto" ] || opts+=" -r '$RET'"
- db_get neurodebian/mirror; nd_mirror="${RET##* }" # get just a url if it came together with alias
- db_get neurodebian/flavor; nd_flavor="$RET"
- db_get neurodebian/components; nd_components="${RET// /}"
-
- db_get neurodebian/overwrite; [ "$RET" = "true" ] && opts+=" --overwrite" || :
- db_get neurodebian/suffix; [ "$RET" = "" ] || opts+=" --suffix='$RET'" || :
-
- eval nd-configurerepo -m "$nd_mirror" -c "$nd_components" $opts
- ;;
- abort-upgrade|abort-remove|abort-deconfigure)
- # nothing to do
- ;;
-
- *)
- echo "postinst called with unknown argument \`$1'" >&2
- exit 1
- ;;
+ db_get neurodebian/enable
+ if [ "$RET" = "true" ]; then
+ # obtain all the options and call nd-configurerepo
+ opts="--do-not-update"
+ db_get neurodebian/release; [ "$RET" = "auto" ] || opts+=" -r '$RET'"
+ db_get neurodebian/mirror; nd_mirror="${RET##* }" # get just a url if it came together with alias
+ db_get neurodebian/flavor; nd_flavor="$RET"
+ db_get neurodebian/components; nd_components="${RET// /}"
+
+ db_get neurodebian/overwrite; [ "$RET" = "true" ] && opts+=" --overwrite" || :
+ db_get neurodebian/suffix; [ "$RET" = "" ] || opts+=" --suffix='$RET'" || :
+
+ eval nd-configurerepo -m "$nd_mirror" -c "$nd_components" $opts
+ else
+ # removing neurodebian APT configs
+ rm -f /etc/apt/sources.list.d/neurodebian.sources*.list
+ fi
+ ;;
+ abort-upgrade|abort-remove|abort-deconfigure)
+ # nothing to do
+ ;;
+
+ *)
+ echo "postinst called with unknown argument \`$1'" >&2
+ exit 1
+ ;;
esac
#DEBHELPER#
Type: title
_Description: NeuroDebian APT repository installer
+Template: neurodebian/enable
+Type: boolean
+Default: false
+_Description: Should NeuroDebian repository be enabled?
+ NeuroDebian project provides a separate APT repository with backport
+ builds of most recent releases of maintained software, datasets and
+ some software not in Debian proper yet. Enabling this additional
+ repository will make those packages available on your base system.
+ .
+ Note: although NeuroDebian team aims to assure robust and correct
+ operation of provided packages, enabling this additional archive
+ might compromise the integrity of your base system.
Template: neurodebian/release
Type: select
Template: neurodebian/run-update-note
Type: note
_Description: APT list of packages needs to be updated
- For the installed NeuroDebian APT configuration to take an effect,
- list of packages needs to be updated. This needs to be done
- "manually" (e.g., via apt-get update) upon completion of installation
- of the neurodebian package.
+ For the installed (or removed) NeuroDebian APT configuration to take
+ an effect, list of packages needs to be updated. This needs to be
+ done "manually" (e.g., via apt-get update) upon completion of
+ installation or reconfiguration of the neurodebian package.
Template: neurodebian/netselect-not-found
Type: error
msgstr ""
"Project-Id-Version: neurodebian\n"
"Report-Msgid-Bugs-To: neurodebian@packages.debian.org\n"
-"POT-Creation-Date: 2014-08-13 14:01-0400\n"
+"POT-Creation-Date: 2014-08-14 12:27-0400\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
msgid "NeuroDebian APT repository installer"
msgstr ""
-#. Type: select
+#. Type: boolean
+#. Description
+#: ../neurodebian.templates:2001
+msgid "Should NeuroDebian repository be enabled?"
+msgstr ""
+
+#. Type: boolean
+#. Description
+#: ../neurodebian.templates:2001
+msgid ""
+"NeuroDebian project provides a separate APT repository with backport builds "
+"of most recent releases of maintained software, datasets and some software "
+"not in Debian proper yet. Enabling this additional repository will make "
+"those packages available on your base system."
+msgstr ""
+
+#. Type: boolean
#. Description
#: ../neurodebian.templates:2001
+msgid ""
+"Note: although NeuroDebian team aims to assure robust and correct operation "
+"of provided packages, enabling this additional archive might compromise the "
+"integrity of your base system."
+msgstr ""
+
+#. Type: select
+#. Description
+#: ../neurodebian.templates:3001
msgid "Release name of the base system:"
msgstr ""
#. Type: select
#. Description
-#: ../neurodebian.templates:2001
+#: ../neurodebian.templates:3001
msgid "Specify for which Debian or Ubuntu release (e.g. wheezy or trusty)."
msgstr ""
#. Type: select
#. Description
-#: ../neurodebian.templates:2001
+#: ../neurodebian.templates:3001
msgid ""
"If 'auto', Debian or Ubuntu release name will be '${release}' as deduced "
"from the output of apt-cache policy. If the release of your system is not "
#. Type: select
#. Description
-#: ../neurodebian.templates:3001
+#: ../neurodebian.templates:4001
msgid "NeuroDebian mirror to use:"
msgstr ""
#. Type: select
#. Description
-#: ../neurodebian.templates:3001
+#: ../neurodebian.templates:4001
msgid ""
"NeuroDebian project has a number of community-maintainer mirrors around the "
"globe."
#. Type: select
#. Description
-#: ../neurodebian.templates:3001
+#: ../neurodebian.templates:4001
msgid "If you do not know which mirror URL to choose, select among"
msgstr ""
#. Type: select
#. Description
-#: ../neurodebian.templates:3001
+#: ../neurodebian.templates:4001
msgid ""
" - origin: original NeuroDebian repository\n"
" - best: will try to use netselect to select \"closest\" mirror.\n"
#. Type: select
#. Description
-#: ../neurodebian.templates:4001
+#: ../neurodebian.templates:5001
msgid "NeuroDebian flavor to use:"
msgstr ""
#. Type: select
#. Description
-#: ../neurodebian.templates:4001
+#: ../neurodebian.templates:5001
msgid ""
"NeuroDebian project adheres to Debian Free Software Guidelines and has three "
"areas of the archive in all suites/releases:"
#. Type: select
#. Description
-#: ../neurodebian.templates:4001
+#: ../neurodebian.templates:5001
msgid ""
" libre\n"
" only the DFSG-compliant materials\n"
#. Type: multiselect
#. Description
-#: ../neurodebian.templates:5001
+#: ../neurodebian.templates:6001
msgid "NeuroDebian repository components to enable:"
msgstr ""
#. Type: multiselect
#. Description
-#: ../neurodebian.templates:5001
+#: ../neurodebian.templates:6001
msgid "NeuroDebian repository provides"
msgstr ""
#. Type: multiselect
#. Description
-#: ../neurodebian.templates:5001
+#: ../neurodebian.templates:6001
msgid ""
" software\n"
" Packages containing software packages, often backports of stable\n"
#. Type: boolean
#. Description
-#: ../neurodebian.templates:6001
+#: ../neurodebian.templates:7001
msgid "Should existing NeuroDebian APT file be overridden?"
msgstr ""
#. Type: boolean
#. Description
-#: ../neurodebian.templates:6001
+#: ../neurodebian.templates:7001
msgid ""
"If not allowed, configuration would fail if there is an existing apt "
"configuration file for the NeuroDebian."
#. Type: string
#. Description
-#: ../neurodebian.templates:7001
+#: ../neurodebian.templates:8001
msgid "Additional suffix for the NeuroDebian APT file name:"
msgstr ""
#. Type: string
#. Description
-#: ../neurodebian.templates:7001
+#: ../neurodebian.templates:8001
msgid ""
"For instance if you would like to enable additional repository (e.g. "
"NeuroDebian devel) or release, without interfering with the main/default "
#. Type: note
#. Description
-#: ../neurodebian.templates:8001
+#: ../neurodebian.templates:9001
msgid "APT list of packages needs to be updated"
msgstr ""
#. Type: note
#. Description
-#: ../neurodebian.templates:8001
+#: ../neurodebian.templates:9001
msgid ""
-"For the installed NeuroDebian APT configuration to take an effect, list of "
-"packages needs to be updated. This needs to be done \"manually\" (e.g., via "
-"apt-get update) upon completion of installation of the neurodebian package."
+"For the installed (or removed) NeuroDebian APT configuration to take an "
+"effect, list of packages needs to be updated. This needs to be done "
+"\"manually\" (e.g., via apt-get update) upon completion of installation or "
+"reconfiguration of the neurodebian package."
msgstr ""
#. Type: error
#. Description
-#: ../neurodebian.templates:9001
+#: ../neurodebian.templates:10001
msgid "netselect tool was not found!"
msgstr ""
#. Type: error
#. Description
-#: ../neurodebian.templates:9001
+#: ../neurodebian.templates:10001
msgid ""
"Please install netselect tool first (apt-get install netselect) or choose a "
"specific mirror."
#. Type: error
#. Description
-#: ../neurodebian.templates:10001
+#: ../neurodebian.templates:11001
msgid "netselect tool was not found (no other mirror)!"
msgstr ""
#. Type: error
#. Description
-#: ../neurodebian.templates:10001
+#: ../neurodebian.templates:11001
msgid ""
"Please install netselect tool first (apt-get install netselect) before "
"installing/configuring this package, or run with a lower DEBIAN_PRIORITY to "