Skip to content

Commit

Permalink
Rework backports.debian.org usage (--backportrepos option)
Browse files Browse the repository at this point in the history
In September 2018 the backports service was migrated from backports.org
to an official service within the Debian project and repositories (see
https://www.debian.org/News/2010/20100905).

This means http://backports.debian.org/debian-backports no longer exists
as such. Accordingly update the URL to point to the Debian repositories
(using ${RELEASE}-backports).
  • Loading branch information
mika committed Dec 30, 2018
1 parent 65c84c8 commit 218bf66
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions chroot-script
Expand Up @@ -192,29 +192,15 @@ EOF
}
# }}}

# check available backports release version {{{
checkbackports() {
wget -q -O/dev/null "http://backports.debian.org/debian-backports/dists/${1}-backports/Release"
}
# }}}

# feature to provide Debian backports repos {{{
backportrepos() {
if [ -n "$BACKPORTREPOS" ] ; then
if ! checkbackports "$RELEASE" ; then
echo "Backports for ${RELEASE} are not available." >&2
exit 1
else
# user might have provided their own apt sources.list
if ! grep -q backports /etc/apt/sources.list.d/backports.list 2>/dev/null ; then
cat >> /etc/apt/sources.list.d/backports.list << EOF
if [ -n "$BACKPORTREPOS" ] ; then
cat >> /etc/apt/sources.list.d/backports.list << EOF
# debian backports: ${RELEASE}-backports repository:
deb http://backports.debian.org/debian-backports ${RELEASE}-backports main
deb-src http://backports.debian.org/debian-backports ${RELEASE}-backports main
deb ${MIRROR} ${RELEASE}-backports main
deb-src ${MIRROR} ${RELEASE}-backports main
EOF
fi
fi
fi
fi
}
# }}}

Expand Down

0 comments on commit 218bf66

Please sign in to comment.