summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-02-18 19:48:04 +0100
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-02-18 19:48:04 +0100
commitf55602cb0cd7403206752479b2ec11c6367e2f6d (patch)
tree063ce150ffbeb3265e70511560f97b0bd73a3e69 /apt-pkg
parent8e3900d0d7efc11d538b944ed1d9e4e3d5286ff6 (diff)
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.
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc7
1 files changed, 6 insertions, 1 deletions
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;
}