Bug#784027: apt: broken "apt-get changelog" command
Control: tags -1 patch
Hi!
We got hit by this bug on the Tanglu debian derivative as well, and we
apply a simple patch to fix it.
I adapted the patch a bit for Debian, change is attached.
Since metadata.ftp-master.debian.org exists for a while now, having
this in stretch should do no harm.
Cheers,
Matthias
P.S: Haven't tested the patch on Debian yet, will do that soon.
--
I welcome VSRE emails. See http://vsre.info/
commit 3e01e033a417ade51051884315091446b46835eb
Author: Matthias Klumpp <matthias@tenstral.net>
Date: Tue Jul 14 01:06:57 2015 +0200
Adapt apt-get changelog downloader to the new URL scheme
Use the new URL scheme and metadata.ftp-master.debian.org for
downloading changelogs.
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index a285377..05ccb6d 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1409,8 +1409,8 @@ static bool DoBuildDep(CommandLine &CmdL)
// GetChangelogPath - return a path pointing to a changelog file or dir /*{{{*/
// ---------------------------------------------------------------------
/* This returns a "path" string for the changelog url construction.
- * Please note that its not complete, it either needs a "/changelog"
- * appended (for the packages.debian.org/changelogs site) or a
+ * Please note that its not complete, it either needs a "_changelog"
+ * appended (for the metadata.ftp-master.debian.org site) or a
* ".changelog" (for third party sites that store the changelog in the
* pool/ next to the deb itself)
* Example return: "pool/main/a/apt/apt_0.8.8ubuntu3"
@@ -1436,7 +1436,7 @@ static string GetChangelogPath(CacheFile &Cache,
// GuessThirdPartyChangelogUri - return url /*{{{*/
// ---------------------------------------------------------------------
/* Contruct a changelog file path for third party sites that do not use
- * packages.debian.org/changelogs
+ * metadata.ftp-master.debian.org
* This simply uses the ArchiveURI() of the source pkg and looks for
* a .changelog file there, Example for "mediabuntu":
* apt-get changelog mplayer-doc:
@@ -1471,7 +1471,7 @@ static bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
pkgCache::VerIterator Ver, string targetfile)
/* Download a changelog file for the given package version to
* targetfile. This will first try the server from Apt::Changelogs::Server
- * (http://packages.debian.org/changelogs by default) and if that gives
+ * (metadata.ftp-master.debian.org/changelogs by default) and if that gives
* a 404 tries to get it from the archive directly (see
* GuessThirdPartyChangelogUri for details how)
*/
@@ -1486,9 +1486,9 @@ static bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher,
// make the server root configurable
server = _config->Find("Apt::Changelogs::Server",
- "http://packages.debian.org/changelogs");
+ "http://metadata.ftp-master.debian.org/changelogs");
path = GetChangelogPath(CacheFile, Pkg, Ver);
- strprintf(changelog_uri, "%s/%s/changelog", server.c_str(), path.c_str());
+ strprintf(changelog_uri, "%s/%s_changelog", server.c_str(), path.c_str());
if (_config->FindB("APT::Get::Print-URIs", false) == true)
{
std::cout << '\'' << changelog_uri << '\'' << std::endl;
diff --git a/doc/examples/configure-index b/doc/examples/configure-index
index 56e7e1a..0a03e15 100644
--- a/doc/examples/configure-index
+++ b/doc/examples/configure-index
@@ -122,7 +122,7 @@ APT
// server the provides the changelogs, the code will assume
// the changlogs are in the pool/ under a srcpkg_ver directory
// with the name "changelog"
- Server "http://packages.debian.org/changelogs";
+ Server "http://metadata.ftp-master.debian.org/changelogs";
}:
// control parameters for cron jobs by /etc/cron.daily/apt
Reply to: