diff options
author | Julian Andres Klode <jak@debian.org> | 2020-08-10 14:24:17 +0000 |
---|---|---|
committer | Julian Andres Klode <jak@debian.org> | 2020-08-10 14:24:17 +0000 |
commit | 23447e9b57a00482a5b26a7cb901f7bf4f28fa73 (patch) | |
tree | af3c727a22aa619d569439e3b2b98b1978b7dacf | |
parent | f21440f5af98e1b5987e040a8f25bc3c2d6b7831 (diff) | |
parent | 64b45e294f0c6931a9b57ae6cc99ecded8f6a2d3 (diff) |
Merge branch 'pu/allow-release-info-change-suite' into 'master'
Default Acquire::AllowReleaseInfoChange::Suite to "true"
See merge request apt-team/apt!128
-rw-r--r-- | apt-pkg/acquire-item.cc | 2 | ||||
-rwxr-xr-x | test/integration/test-apt-update-releaseinfo-changes | 14 |
2 files changed, 15 insertions, 1 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index 9b13a2483..820dc7b59 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1810,7 +1810,7 @@ bool pkgAcqMetaBase::VerifyVendor(string const &) /*{{{*/ { "Origin", AllowInfoChange, &metaIndex::GetOrigin }, { "Label", AllowInfoChange, &metaIndex::GetLabel }, { "Version", true, &metaIndex::GetVersion }, // numbers change all the time, that is okay - { "Suite", AllowInfoChange, &metaIndex::GetSuite }, + { "Suite", true, &metaIndex::GetSuite }, { "Codename", AllowInfoChange, &metaIndex::GetCodename }, { nullptr, false, nullptr } }; diff --git a/test/integration/test-apt-update-releaseinfo-changes b/test/integration/test-apt-update-releaseinfo-changes index e4bca3658..ee36c4687 100755 --- a/test/integration/test-apt-update-releaseinfo-changes +++ b/test/integration/test-apt-update-releaseinfo-changes @@ -78,3 +78,17 @@ testsuccesswithnotice apt update --allow-releaseinfo-change-defaultpin testequal "All packages are up to date. N: Repository 'file:$APTARCHIVE earth InRelease' changed its default priority for apt_preferences(5) from 1 to 500. N: More information about this can be found online in the Release notes at: https://example.org/mars/release-notes" tail -n 3 rootdir/tmp/testsuccesswithnotice.output + +# Suite testing also needs codename adjustment, otherwise complaints about +# mismatch between sources.list and Release file. +sed -i -e 's#^Suite: earth#Suite: mars#' $(find ./aptarchive -name 'Release') +sed -i -e 's#^Codename: colony#Codename: earth#' $(find ./aptarchive -name 'Release') +signreleasefiles +testfailuremsg "E: Repository 'file:$APTARCHIVE earth InRelease' changed its 'Suite' value from 'earth' to 'mars' +E: Repository 'file:$APTARCHIVE earth InRelease' changed its 'Codename' value from 'colony' to 'earth' +N: More information about this can be found online in the Release notes at: https://example.org/mars/release-notes +N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details." apt update --no-allow-releaseinfo-change-suite +testsuccesswithnotice apt update --allow-releaseinfo-change-codename +testequal "N: Repository 'file:$APTARCHIVE earth InRelease' changed its 'Suite' value from 'earth' to 'mars' +N: Repository 'file:$APTARCHIVE earth InRelease' changed its 'Codename' value from 'colony' to 'earth' +N: More information about this can be found online in the Release notes at: https://example.org/mars/release-notes" tail -n 3 rootdir/tmp/testsuccesswithnotice.output |