From f229813f60e33ce78f8cd0733a55c36a17a9adf3 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 15 Nov 2010 10:05:32 +0100 Subject: * cmdline/apt-changelog: Read server name from configuration APT::Changelog::Server instead of hardcoding it. This allows local users to point to a local changelog mirror, or make this script work for Debian. * Add debian/apt.conf.changelog: Configuration for apt-changelog with the server for Ubuntu (changelogs.ubuntu.com). Install it in debian/rules. * doc/apt-changelog.1.xml: Document the new option. --- cmdline/apt-changelog | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'cmdline') diff --git a/cmdline/apt-changelog b/cmdline/apt-changelog index a333355a0..6d7c0e95f 100755 --- a/cmdline/apt-changelog +++ b/cmdline/apt-changelog @@ -47,10 +47,18 @@ version=${version#*:} dir=`echo "$showsrc"| grep ^Directory:` dir=${dir#Directory: } +# get configuration +eval `apt-config shell SERVER Apt::Changelog::Server` + +if [ -z "$SERVER" ]; then + echo "ERROR: You need to set Apt::Changelog::Server configuration option" >&2 + exit 1 +fi + # fetch it OUT=`mktemp -t "${pkg}.changes.XXXXXX"` trap "rm $OUT" 0 HUP INT QUIT ILL ABRT FPE SEGV PIPE TERM -if ! wget -q -O- http://changelogs.ubuntu.com/changelogs/$dir/${pkg}_${version}/changelog > "$OUT" +if ! wget -q -O- ${SERVER}/$dir/${pkg}_${version}/changelog > "$OUT" then echo "ERROR: changelog for this version is not (yet) available; try https://launchpad.net/ubuntu/+source/$pkg/+changelog" >&2 exit 1 -- cgit v1.2.3