From 05bb1e5dc88497b5e4b5ba684ace99c42d1881f9 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 26 Apr 2011 19:15:29 +0200 Subject: * apt-pkg/deb/debmetaindex.cc: - do not download TranslationIndex if no Translation-* will be downloaded later on anyway (Closes: #624218) --- apt-pkg/deb/debmetaindex.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'apt-pkg/deb/debmetaindex.cc') diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index a6edab6b9..a91cc34e9 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -195,11 +195,14 @@ vector * debReleaseIndex::ComputeIndexTargets() const { } } + std::vector const lang = APT::Configuration::getLanguages(true); + if (lang.empty() == true) + return IndexTargets; + // get the Translations: // - if its a dists-style repository get the i18n/Index first // - if its flat try to acquire files by guessing if (Dist[Dist.size() - 1] == '/') { - std::vector const lang = APT::Configuration::getLanguages(true); for (std::set::const_iterator s = sections.begin(); s != sections.end(); ++s) { for (std::vector::const_iterator l = lang.begin(); -- cgit v1.2.3