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
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 /*{{{*/
/** 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
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;
or <literal>Acquire::Changelogs::URI::Override::Origin::<replaceable>ORIGIN</replaceable></literal>.
The value should be a normal URI to a text file, expect that package specific data is
- replaced with the placeholder <literal>CHANGEPATH</literal>. The
+ replaced with the placeholder <literal>@CHANGEPATH@</literal>. The
value for it is: 1. if the package is from a component (e.g. <literal>main</literal>)
this is the first part otherwise it is omitted, 2. the first letter of source package name,
expect if the source package name starts with '<literal>lib</literal>' in which case it will
"fr";
};
- // Location of the changelogs with the placeholder CHANGEPATH (e.g. "main/a/apt/apt_1.1")
- Changelogs::URI::Origin::Debian "http://metadata.ftp-master.debian.org/changelogs/CHANGEPATH_changelog";
+ // Location of the changelogs with the placeholder @CHANGEPATH@ (e.g. "main/a/apt/apt_1.1")
+ Changelogs::URI::Origin::Debian "http://metadata.ftp-master.debian.org/changelogs/@CHANGEPATH@_changelog";
};
// Directory layout
"<literal>Acquire::Changelogs::URI::Override::Origin::<replaceable>ORIGIN</replaceable></literal>. "
"The value should be a normal URI to a text file, expect that package "
"specific data is replaced with the placeholder "
-"<literal>CHANGEPATH</literal>. The value for it is: 1. if the package is "
+"<literal>@CHANGEPATH@</literal>. The value for it is: 1. if the package is "
"from a component (e.g. <literal>main</literal>) this is the first part "
"otherwise it is omitted, 2. the first letter of source package name, expect "
"if the source package name starts with '<literal>lib</literal>' in which "
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
"replaceable></literal> or <literal>Acquire::Changelogs::URI::Override::"
"Origin::<replaceable>ORIGIN</replaceable></literal>. The value should be a "
"normal URI to a text file, expect that package specific data is replaced "
-"with the placeholder <literal>CHANGEPATH</literal>. The value for it is: 1. "
+"with the placeholder <literal>@CHANGEPATH@</literal>. The value for it is: 1. "
"if the package is from a component (e.g. <literal>main</literal>) this is "
"the first part otherwise it is omitted, 2. the first letter of source "
"package name, expect if the source package name starts with '<literal>lib</"
'http://changelogs.ubuntu.com/changelogs/pool/main/libb/libbar/libbar_1.0/changelog' libbar.changelog" aptget changelog foo libbar --print-uris
testsuccessequal "'http://localhost:${APTHTTPPORT}/main/f/foo/foo_1.0.changelog' foo.changelog
-'http://localhost:${APTHTTPPORT}/main/libb/libbar/libbar_1.0.changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Label::Debian="http://localhost:${APTHTTPPORT}/CHANGEPATH.changelog"
+'http://localhost:${APTHTTPPORT}/main/libb/libbar/libbar_1.0.changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Label::Debian="http://localhost:${APTHTTPPORT}/@CHANGEPATH@.changelog"
sed -i '/^Origin: / a\
-Changelogs: http://example.org/CHANGEPATH-changelog' $(find rootdir/var/lib/apt/lists -name '*Release')
+Changelogs: http://example.org/@CHANGEPATH@-changelog' $(find rootdir/var/lib/apt/lists -name '*Release')
rm -f rootdir/var/cache/apt/*.bin
testsuccessequal "'http://example.org/main/f/foo/foo_1.0-changelog' foo.changelog
-'http://example.org/main/libb/libbar/libbar_1.0-changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Label::Debian="http://localhost:${APTHTTPPORT}/CHANGEPATH.changelog"
+'http://example.org/main/libb/libbar/libbar_1.0-changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Label::Debian="http://localhost:${APTHTTPPORT}/@CHANGEPATH@.changelog"
testsuccessequal "'http://localhost:${APTHTTPPORT}/main/f/foo/foo_1.0.changelog' foo.changelog
-'http://localhost:${APTHTTPPORT}/main/libb/libbar/libbar_1.0.changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Override::Label::Debian="http://localhost:${APTHTTPPORT}/CHANGEPATH.changelog"
+'http://localhost:${APTHTTPPORT}/main/libb/libbar/libbar_1.0.changelog' libbar.changelog" aptget changelog foo libbar --print-uris -o Acquire::Changelogs::URI::Override::Label::Debian="http://localhost:${APTHTTPPORT}/@CHANGEPATH@.changelog"
releasechanger 'Changelogs' 'no'
if [ "$(id -u)" = '0' ]; then
sed -i '/^Changelogs: / d' $(find rootdir/var/lib/apt/lists -name '*Release')
releasechanger 'Label' 'Testcases'
-echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/CHANGEPATH/change.txt\";" > rootdir/etc/apt/apt.conf.d/changelog.conf
+echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/@CHANGEPATH@/change.txt\";" > rootdir/etc/apt/apt.conf.d/changelog.conf
testsuccessequal "'http://localhost:${APTHTTPPORT}/main/f/foo/foo_1.0/change.txt' foo.changelog
'http://localhost:${APTHTTPPORT}/main/libb/libbar/libbar_1.0/change.txt' libbar.changelog" aptget changelog foo libbar --print-uris
-echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/pool/CHANGEPATH/changelog\";" > rootdir/etc/apt/apt.conf.d/changelog.conf
+echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/pool/@CHANGEPATH@/changelog\";" > rootdir/etc/apt/apt.conf.d/changelog.conf
testsuccessequal "'http://localhost:${APTHTTPPORT}/pool/main/f/foo/foo_1.0/changelog' foo.changelog" aptget changelog foo --print-uris
testfileequal 'foo.changelog' "$(cat ../aptarchive/pool/main/f/foo/foo_1.0/changelog)"
rm -f foo.changelog
-# no CHANGEPATH in the URI
+# no @CHANGEPATH@ in the URI
testequal 'E: Failed to fetch changelog:/foo.changelog Changelog unavailable for foo=1.0
' aptget changelog foo -qq -d -o Acquire::Changelogs::URI::Label::Testcases="http://localhost:${APTHTTPPORT}/change.txt"
testfailure test -e foo.changelog
testequal "E: Failed to fetch http://localhost:${APTHTTPPORT}/does/not/exist/main/f/foo/foo_1.0/change.txt Changelog unavailable for foo=1.0 (404 Not Found)
-" aptget changelog foo -qq -d -o Acquire::Changelogs::URI::Label::Testcases="http://localhost:${APTHTTPPORT}/does/not/exist/CHANGEPATH/change.txt"
+" aptget changelog foo -qq -d -o Acquire::Changelogs::URI::Label::Testcases="http://localhost:${APTHTTPPORT}/does/not/exist/@CHANGEPATH@/change.txt"
testfailure test -e foo.changelog
msgtest 'Test that the webserver does not answer' 'http requests'
downloadfile "http://localhost:${APTHTTPPORT}/pool/main/a/apt/apt_1.0/changelog" changelog >/dev/null 2>&1 && msgfail || msgpass
-echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/redirectme/pool/CHANGEPATH/changelog\";" > rootdir/etc/apt/apt.conf.d/changelog.conf
+echo "Acquire::Changelogs::URI::Label::Testcases \"http://localhost:${APTHTTPPORT}/redirectme/pool/@CHANGEPATH@/changelog\";" > rootdir/etc/apt/apt.conf.d/changelog.conf
testsuccessequal "'http://localhost:${APTHTTPPORT}/redirectme/pool/main/a/apt/apt_1.0/changelog' apt.changelog" aptget changelog apt --print-uris
cd downloaded