Package: aptitude Version: 0.6.8.1-1 Severity: minor Tags: confirmed patch Dear Maintainer,
Since 0.8.11 apt-get is using APT::Changelogs::Server as the location of the changelog service. Downstreams change this to support fetching changelogs from their own services. Aptitude currently uses a hardcoded value in pkg_changelog.cc. For consistency with other frontends and to minimize work for downstreams we should also adopt this setting. There is also a very old entry in apt_options.cc for Aptitude::Changelog-URL-Template which has not been effective for several years. Patch. -- System Information: Debian Release: wheezy/sid APT prefers unstable APT policy: (500, 'unstable'), (1, 'experimental') Architecture: i386 (i686) Foreign Architectures: amd64 Kernel: Linux 2.6.32-5-686-bigmem (SMP w/1 CPU core) Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages aptitude depends on: ii aptitude-common 0.6.8.1-1 ii libapt-pkg4.12 0.9.7.4 ii libboost-iostreams1.49.0 1.49.0-3.1 ii libc6 2.13-35 ii libcwidget3 0.5.16-3.4 ii libept1.4.12 1.0.9 ii libgcc1 1:4.7.1-7 ii libncursesw5 5.9-10 ii libsigc++-2.0-0c2a 2.2.10-0.2 ii libsqlite3-0 3.7.13-1 ii libstdc++6 4.7.1-7 ii libtinfo5 5.9-10 ii libxapian22 1.2.12-1 ii zlib1g 1:1.2.7.dfsg-13 Versions of packages aptitude recommends: ii apt-xapian-index 0.45 ii aptitude-doc-en [aptitude-doc] 0.6.8.1-1 ii libparse-debianchangelog-perl 1.2.0-1 ii sensible-utils 0.0.7 Versions of packages aptitude suggests: ii debtags 1.10.2 ii tasksel 3.09 -- no debconf information
>From 996ab259de5f6182e863893b27eea8af3e56c56c Mon Sep 17 00:00:00 2001 From: Daniel Hartwig <mand...@gmail.com> Date: Tue, 11 Sep 2012 12:40:46 +0800 Subject: [PATCH] Download changelogs from APT::Changelogs::Server * src/generic/apt/pkg_changelog.cc: - download changelogs from APT::Changelogs::Server instead of a fixed location; * src/apt_options.cc: - replace Aptitude::Changelog-URL-Template which was used only in ancient history with APT::Changelogs::Server --- NEWS | 3 +++ src/apt_options.cc | 8 ++++---- src/generic/apt/pkg_changelog.cc | 9 ++++++++- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/NEWS b/NEWS index dffde9f..8eeecb1 100644 --- a/NEWS +++ b/NEWS @@ -17,6 +17,9 @@ Version 0.6.8.2 "Say 'what' again" by default and works without deb-src entries. (Closes: #587775, #631464) + * [all]: Download changelogs from APT::Changelogs::Server instead + of a fixed location. + - Documentation: - Translation updates: diff --git a/src/apt_options.cc b/src/apt_options.cc index bfeeda5..912aa09 100644 --- a/src/apt_options.cc +++ b/src/apt_options.cc @@ -291,12 +291,12 @@ option_item misc_options[]={ "downloaded from any archive in sources.list."), PACKAGE "::AutoClean-After-Update", false), option_item(N_("URL to use to download changelogs"), - N_("This option controls the template that's used to " - "download changelogs from the Debian Web site. You " + N_("This option controls the server used to " + "download changelogs. You " "should only need to change this if the changelogs move " "to a different URL."), - PACKAGE "::Changelog-URL-Template", - "http://cgi.debian.org/cgi-bin/get-changelog?package=%s"), + "APT::Changelogs::Server", + "http://packages.debian.org/changelogs"), option_item(N_("Display a preview of what will be done before doing it"), N_("If this option is enabled, then when you ask " "aptitude to perform an install run, it will " diff --git a/src/generic/apt/pkg_changelog.cc b/src/generic/apt/pkg_changelog.cc index 9b1caf3..6e67251 100644 --- a/src/generic/apt/pkg_changelog.cc +++ b/src/generic/apt/pkg_changelog.cc @@ -20,6 +20,7 @@ #include "pkg_changelog.h" #include "apt.h" +#include "config_signal.h" #include "download_queue.h" #include <generic/util/job_queue_thread.h> @@ -542,12 +543,18 @@ namespace aptitude else realver = source_version; - string uri = cw::util::ssprintf("http://packages.debian.org/changelogs/pool/%s/%s/%s/%s_%s/changelog", + // WATCH: apt/cmdline/apt-get.cc(DownloadChangelog) + string server = aptcfg->Find("APT::Changelogs::Server", + "http://packages.debian.org/changelogs"); + string path = cw::util::ssprintf("pool/%s/%s/%s/%s_%s", realsection.c_str(), prefix.c_str(), source_package.c_str(), source_package.c_str(), realver.c_str()); + string uri = cw::util::ssprintf("%s/%s/changelog", + server.c_str(), + path.c_str()); LOG_TRACE(logger, "Adding " << uri << " as a URI for the changelog of " << source_package << " " << source_version); -- 1.7.9