4 # minimal installation with few of those packages
5 apt_file=/etc/apt/sources.list.d/local.list
6 apt_nd_file=/etc/apt/sources.list.d/neurodebian.sources.list
8 # clean up from a previous test
9 dpkg --purge neurodebian neurodebian-archive-keyring || :
10 echo PURGE | debconf-communicate neurodebian || :
11 rm -rf /tmp/apt $apt_file;
13 mkdir -p /tmp/apt; cd /tmp/apt;
14 rm -f neurodebian-*deb; apt-get update -y; apt-get install -y wget;
15 wget http://www.onerussian.com/tmp/neurodebian_0.34_all.deb;
16 wget http://www.onerussian.com/tmp/neurodebian-archive-keyring_0.34_all.deb;
19 apt-get install -y dpkg-dev ; dpkg-scanpackages . /dev/null > Packages
20 # Add it to the list of available
21 echo "deb file:///tmp/apt ./" >| $apt_file; apt-get update
23 DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated neurodebian
24 # By default should not get enabled
25 [ ! -e "$apt_nd_file" ]
27 DEBIAN_FRONTEND=noninteractive NEURODEBIAN_ENABLE=yes apt-get install -y --allow-unauthenticated --reinstall neurodebian
29 # Verify that it has correct entries
30 # Very cruel way to figure out the default release. Would fail if
31 # options, such as multiarch, are specified after deb
32 release=$(grep -e '^\s*deb\s' /etc/apt/sources.list | head -1 | awk '{print $3;}')
33 grep -E "^deb\s+http.* $release main\s*\$" $apt_nd_file
34 grep -E '^deb\s+http.* data main\s*$' $apt_nd_file
35 # May be even retrospect stored debconf configuration
36 apt-get install debconf-utils
37 debconf-get-selections | grep neurodebian/release.*select.*auto
38 # And apt-get must be working
40 # Make sure it is active
41 apt-cache policy | grep o=NeuroDebian,.*,n=data
42 apt-cache policy | grep o=NeuroDebian,.*,n=$release
45 dpkg --purge neurodebian
47 apt-cache policy | grep o=NeuroDebian && exit 1 || :