[deb bootstrap] Add precise-backports for libaugeas0

This commit is contained in:
Peter Eckersley
2016-01-07 09:44:13 -08:00
parent 4bdd96a29e
commit dc7f479fe3
+19 -5
View File
@@ -35,25 +35,39 @@ fi
augeas_pkg=libaugeas0 augeas_pkg=libaugeas0
AUGVERSION=`apt-cache show --no-all-versions libaugeas0 | grep ^Version: | cut -d" " -f2` AUGVERSION=`apt-cache show --no-all-versions libaugeas0 | grep ^Version: | cut -d" " -f2`
if dpkg --compare-versions 1.0 gt "$AUGVERSION" ; then AddBackportRepo() {
if lsb_release -a | grep -q wheezy ; then # ARGS:
if ! grep -v -e ' *#' /etc/apt/sources.list | grep -q wheezy-backports ; then BACKPORT_NAME="$0"
BACKPORT_SOURCELINE="$1"
if ! grep -v -e ' *#' /etc/apt/sources.list | grep -q "$BACKPORT_NAME" ; then
# This can theoretically error if sources.list.d is empty, but in that case we don't care. # This can theoretically error if sources.list.d is empty, but in that case we don't care.
if ! grep -v -e ' *#' /etc/apt/sources.list.d/* 2>/dev/null | grep -q wheezy-backports ; then if ! grep -v -e ' *#' /etc/apt/sources.list.d/* 2>/dev/null | grep -q "$BACKPORT_NAME"; then
/bin/echo -n "Installing augeas from wheezy-backports in 3 seconds..." /bin/echo -n "Installing augeas from wheezy-backports in 3 seconds..."
sleep 1s sleep 1s
/bin/echo -ne "\e[0K\rInstalling augeas from wheezy-backports in 2 seconds..." /bin/echo -ne "\e[0K\rInstalling augeas from wheezy-backports in 2 seconds..."
sleep 1s sleep 1s
/bin/echo -e "\e[0K\rInstalling augeas from wheezy-backports in 1 second ..." /bin/echo -e "\e[0K\rInstalling augeas from wheezy-backports in 1 second ..."
sleep 1s sleep 1s
if echo $BACKPORT_NAME | grep -q wheezy ; then
/bin/echo '(Backports are only installed if explicitly requested via "apt-get install -t wheezy-backports")' /bin/echo '(Backports are only installed if explicitly requested via "apt-get install -t wheezy-backports")'
fi
echo deb http://http.debian.net/debian wheezy-backports main >> /etc/apt/sources.list.d/wheezy-backports.list echo $BACKPORT_SOURCELINE >> /etc/apt/sources.list.d/"$BACKPORT_NAME".list
apt-get update apt-get update
fi fi
fi fi
}
if dpkg --compare-versions 1.0 gt "$AUGVERSION" ; then
if lsb_release -a | grep -q wheezy ; then
AddBackportRepo wheezy-backports "deb http://http.debian.net/debian wheezy-backports main"
apt-get install -y --no-install-recommends -t wheezy-backports libaugeas0 apt-get install -y --no-install-recommends -t wheezy-backports libaugeas0
augeas_pkg= augeas_pkg=
elif lsb_release -a | grep -q precise ; then
# XXX add ARM case
AddBackportRepo precise-backports "deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse"
else else
echo "No libaugeas0 version is available that's new enough to run the" echo "No libaugeas0 version is available that's new enough to run the"
echo "Let's Encrypt apache plugin..." echo "Let's Encrypt apache plugin..."