From 2a81f98b124d8fe551b160df55db1d3bf79a77c1 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 6 Mar 2021 16:11:34 +0100 Subject: Ensure all index files sent custom tags to the methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The mirror method can distribute requests for files based on various metadata bits, but some – the main index files – weren't actually passing those on to the methods as advertised in the manpage. This is hidden both by mirror usually falling back to other sources which will eventually hit the right one and that if the repository does not support by-hash apt will automatically stick to the mirror which was used for the Release file. --- apt-pkg/acquire-item.cc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index cc3d2f1ff..ab4306aac 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -3177,8 +3177,8 @@ void pkgAcqIndex::Init(string const &URI, string const &URIDesc, /* The only header we use is the last-modified header. */ string pkgAcqIndex::Custom600Headers() const { - - string msg = "\nIndex-File: true"; + std::string msg = pkgAcqBaseIndex::Custom600Headers(); + msg.append("\nIndex-File: true"); if (TransactionManager->LastMetaIndexParser == NULL) { @@ -3930,9 +3930,10 @@ void pkgAcqFile::Done(string const &Message,HashStringList const &CalcHashes, /*}}}*/ string pkgAcqFile::Custom600Headers() const /*{{{*/ { - if (IsIndexFile) - return "\nIndex-File: true"; - return ""; + string Header = pkgAcquire::Item::Custom600Headers(); + if (not IsIndexFile) + return Header; + return Header + "\nIndex-File: true"; } /*}}}*/ pkgAcqFile::~pkgAcqFile() {} -- cgit v1.2.3-70-g09d2