From f55602cb0cd7403206752479b2ec11c6367e2f6d Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Sat, 18 Feb 2012 19:48:04 +0100 Subject: use pdiff for Translation-* files if available (Closes: #657902) Beware: pdiffs for Translation-* are only acquired if their availability is advertised in the Release file. --- apt-pkg/acquire-item.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'apt-pkg') diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc index ca40b0bd7..4e6fb7ff9 100644 --- a/apt-pkg/acquire-item.cc +++ b/apt-pkg/acquire-item.cc @@ -1395,7 +1395,12 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify) /*{{{*/ (*Target)->ShortDesc, ExpectedIndexHash); else if (transInRelease == false || MetaIndexParser->Exists((*Target)->MetaKey) == true) { - new pkgAcqIndexTrans(Owner, *Target, ExpectedIndexHash, MetaIndexParser); + if (_config->FindB("Acquire::PDiffs",true) == true && transInRelease == true && + MetaIndexParser->Exists(string((*Target)->MetaKey).append(".diff/Index")) == true) + new pkgAcqDiffIndex(Owner, (*Target)->URI, (*Target)->Description, + (*Target)->ShortDesc, ExpectedIndexHash); + else + new pkgAcqIndexTrans(Owner, *Target, ExpectedIndexHash, MetaIndexParser); } continue; } -- cgit v1.2.3