summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcmdline/apt-changelog10
-rw-r--r--debian/apt.conf.changelog6
-rw-r--r--debian/changelog6
-rwxr-xr-xdebian/rules1
-rw-r--r--doc/apt-changelog.1.xml9
5 files changed, 28 insertions, 4 deletions
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
diff --git a/debian/apt.conf.changelog b/debian/apt.conf.changelog
new file mode 100644
index 000000000..3466bb6e0
--- /dev/null
+++ b/debian/apt.conf.changelog
@@ -0,0 +1,6 @@
+// Server information for apt-changelog
+APT {
+ Changelog {
+ Server "http://changelogs.ubuntu.com/changelogs";
+ }
+}
diff --git a/debian/changelog b/debian/changelog
index b7f290713..2f95d2e00 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,12 @@ apt (0.8.8ubuntu3) UNRELEASED; urgency=low
* cmdline/apt-changelog: Filter out multiple results for a source package,
just take the latest one.
+ * 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.
-- Martin Pitt <martin.pitt@ubuntu.com> Fri, 12 Nov 2010 16:53:31 +0100
diff --git a/debian/rules b/debian/rules
index 9f3dca627..ea0fec443 100755
--- a/debian/rules
+++ b/debian/rules
@@ -216,6 +216,7 @@ apt: build build-doc debian/shlibs.local
cp debian/apt.logrotate debian/$@/etc/logrotate.d/apt
cp share/ubuntu-archive.gpg debian/$@/usr/share/$@
cp debian/apt.conf.autoremove debian/$@/etc/apt/apt.conf.d/01autoremove
+ cp debian/apt.conf.changelog debian/$@/etc/apt/apt.conf.d/20changelog
# copy lintian override
cp share/lintian-overrides debian/$@/usr/share/lintian/overrides/apt
diff --git a/doc/apt-changelog.1.xml b/doc/apt-changelog.1.xml
index 2f545bb68..f881dad8a 100644
--- a/doc/apt-changelog.1.xml
+++ b/doc/apt-changelog.1.xml
@@ -51,9 +51,12 @@
<refsect1><title>Description</title>
<para>
- <command>apt-changelog</command> downloads a package changelog from
- <ulink>http://changelogs.ubuntu.com</ulink> and displays it through
- <command>sensible-pager</command>.
+ <command>apt-changelog</command> downloads a package changelog and displays
+ it through <command>sensible-pager</command>. The server name and base
+ directory is defined in the <literal>APT::Changelog::Server</literal>
+ variable (e. g. <ulink>http://packages.debian.org/changelogs</ulink> for
+ Debian or <ulink>http://changelogs.ubuntu.com/changelogs</ulink> for
+ Ubuntu).
</para>
<para>