summaryrefslogtreecommitdiff
path: root/apt-pkg/init.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-13 11:13:45 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-06-15 14:39:37 +0200
commitd56e2917f27a722b54685de13aeb1bb7592fc61b (patch)
tree2ab5e8f7704050189851e0ba6b9cce97a129b7ce /apt-pkg/init.cc
parentd2cb5b153fb13d587b1ff632cab34ce0c403326e (diff)
provide a public interface for acquiring changelogs
Provided is a specialized acquire item which given a version can figure out the correct URI to try by itself and if not provides an error message alongside with static methods to get just the URI it would try to download if it should just be displayed or similar such. The URI is constructed as follows: Release files can provide an URI template in the "Changelogs" field, otherwise we lookup a configuration item based on the "Label" or "Origin" of the Release file to get a (hopefully known) default value for now. This template should contain the string CHANGEPATH which is replaced with the information about the version we want the changelog for (e.g. main/a/apt/apt_1.1). This middleway was choosen as this path part was consistent over the three known implementations (+1 defunct), while the rest of the URI varies widely between them. The benefit of this construct is that it is now easy to get changelogs for Debian packages on Ubuntu and vice versa – even at the moment where the Changelogs field is present nowhere. Strictly better than what apt-get had before as it would even fail to get changelogs from security… Now it will notice that security identifies as Origin: Debian and pick this setting (assuming again that no Changelogs field exists). If on the other hand security would ship its changelogs in a different location we could set it via the Label option overruling Origin. Closes: 687147, 739854, 784027, 787190
Diffstat (limited to 'apt-pkg/init.cc')
-rw-r--r--apt-pkg/init.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc
index e2239a906..96966b249 100644
--- a/apt-pkg/init.cc
+++ b/apt-pkg/init.cc
@@ -119,6 +119,10 @@ bool pkgInitConfig(Configuration &Cnf)
Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::flatDescription", "$(SITE) $(RELEASE) Sources");
Cnf.CndSet("APT::Acquire::Targets::deb-src::Sources::Optional", false);
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Debian", "http://metadata.ftp-master.debian.org/changelogs/CHANGEPATH_changelog");
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Ubuntu", "http://changelogs.ubuntu.com/changelogs/pool/CHANGEPATH/changelog");
+ Cnf.CndSet("Acquire::Changelogs::URI::Origin::Ultimedia", "http://packages.ultimediaos.com/changelogs/pool/CHANGEPATH/changelog.txt");
+
bool Res = true;
// Read an alternate config file