- --othermirror "deb http://neuro.debian.net/debian $dist main contrib non-free"
- # deploy our key manually since archive with package is not yet
- # available at this point
- cp --preserve=mode {,${cow}}/etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg
+ --othermirror "${updates_apt}deb http://neuro.debian.net/debian $dist main contrib non-free | deb http://neuro.debian.net/debian data main contrib non-free"
+ # deploy our key manually since archive with package is not yet
+ # available at this point
+ mkdir -p ${cow}/etc/apt/trusted.gpg.d
+ cp --preserve=mode {,${cow}}/etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg
+ # Old ubuntus might not have capability to read from that key yet,
+ # so we would need to manually add it
+ if [ $dist = 'karmic' ] || [ $dist = 'hardy' ]; then
+ chroot ${cow} bash -c "apt-get install -y --force-yes gnupg \
+ && /usr/bin/apt-key add /etc/apt/trusted.gpg.d/neurodebian-archive-keyring.gpg \
+ && /usr/bin/apt-get update"
+ fi