diff options
author | David Kalnischkies <david@kalnischkies.de> | 2015-12-02 12:43:33 +0100 |
---|---|---|
committer | David Kalnischkies <david@kalnischkies.de> | 2015-12-02 12:59:23 +0100 |
commit | 430481e794a3fa2e75022c67e129b54d192ad54c (patch) | |
tree | cd9d47800beaca2aba8fd096a776e49ed6914fbd /apt-pkg | |
parent | 39f96d07cfe61f5e87279a704baed85f1468bc57 (diff) |
use @CHANGEPATH@ as placeholder in changelog URI templates
This should make it more obvious that CHANGEPATH is a placeholder which
apt will replace with a package specific path rather than a string
constant.
Mail-Reference: <87d1upgvaf.fsf@deep-thought.43-1.org>
Mail-Archive: https://lists.debian.org/debian-dak/2015/12/msg00005.html
Diffstat (limited to 'apt-pkg')
-rw-r--r-- | apt-pkg/acquire-item.cc | 4 | ||||
-rw-r--r-- | apt-pkg/acquire-item.h | 2 | ||||
-rw-r--r-- | apt-pkg/init.cc | 8 |
3 files changed, 7 insertions, 7 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 189d1e06b..e0f02b8e2 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3178,7 +3178,7 @@ std::string pkgAcqChangelog::URI(std::string const &Template, char const * const Component, char const * const SrcName, char const * const SrcVersion) { - if (Template.find("CHANGEPATH") == std::string::npos) + if (Template.find("@CHANGEPATH@") == std::string::npos) return ""; // the path is: COMPONENT/SRC/SRCNAME/SRCNAME_SRCVER, e.g. main/a/apt/1.1 or contrib/liba/libapt/2.0 @@ -3190,7 +3190,7 @@ std::string pkgAcqChangelog::URI(std::string const &Template, if (Component != NULL && strlen(Component) != 0) path = std::string(Component) + "/" + path; - return SubstVar(Template, "CHANGEPATH", path); + return SubstVar(Template, "@CHANGEPATH@", path); } /*}}}*/ // AcqChangelog::Failed - Failure handler /*{{{*/ diff --git a/apt-pkg/acquire-item.h b/apt-pkg/acquire-item.h index d77b5f9ef..134bbab7e 100644 --- a/apt-pkg/acquire-item.h +++ b/apt-pkg/acquire-item.h @@ -1103,7 +1103,7 @@ class pkgAcqChangelog : public pkgAcquire::Item /** returns the URI to the changelog of this version * - * \param Template URI where CHANGEPATH has to be filled in + * \param Template URI where @CHANGEPATH@ has to be filled in * \param Component in which the package resides, can be empty * \param SrcName is the source package name * \param SrcVersion is the source package version diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index eab198fac..c35477bf6 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -116,10 +116,10 @@ bool pkgInitConfig(Configuration &Cnf) Cnf.CndSet("Acquire::IndexTargets::deb-src::Sources::flatDescription", "$(RELEASE) Sources"); Cnf.CndSet("Acquire::IndexTargets::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::Tanglu", "http://metadata.tanglu.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"); + Cnf.CndSet("Acquire::Changelogs::URI::Origin::Debian", "http://metadata.ftp-master.debian.org/changelogs/@CHANGEPATH@_changelog"); + Cnf.CndSet("Acquire::Changelogs::URI::Origin::Tanglu", "http://metadata.tanglu.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; |