From 97234432dbd652bc13a419dc37fda1e5cd3622a5 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Fri, 13 May 2005 19:43:07 +0000 Subject: [PATCH] * made the translation downloading work --- apt-pkg/deb/debindexfile.cc | 8 +++++++- apt-pkg/deb/debmetaindex.cc | 8 ++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index ffecbdfca..c7c36b89a 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -572,6 +572,11 @@ class debIFTypePkg : public pkgIndexFile::Type }; debIFTypePkg() {Label = "Debian Package Index";}; }; +class debIFTypeTrans : public debIFTypePkg +{ + public: + debIFTypeTrans() {Label = "Debian Translation Index";}; +}; class debIFTypeStatus : public pkgIndexFile::Type { public: @@ -584,6 +589,7 @@ class debIFTypeStatus : public pkgIndexFile::Type }; static debIFTypeSrc _apt_Src; static debIFTypePkg _apt_Pkg; +static debIFTypeTrans _apt_Trans; static debIFTypeStatus _apt_Status; const pkgIndexFile::Type *debSourcesIndex::GetType() const @@ -596,7 +602,7 @@ const pkgIndexFile::Type *debPackagesIndex::GetType() const } const pkgIndexFile::Type *debTranslationsIndex::GetType() const { - return &_apt_Pkg; + return &_apt_Trans; } const pkgIndexFile::Type *debStatusIndex::GetType() const { diff --git a/apt-pkg/deb/debmetaindex.cc b/apt-pkg/deb/debmetaindex.cc index 7f15fd2e1..9c7828d6a 100644 --- a/apt-pkg/deb/debmetaindex.cc +++ b/apt-pkg/deb/debmetaindex.cc @@ -157,6 +157,14 @@ bool debReleaseIndex::GetIndexes(pkgAcquire *Owner, bool GetAll) const ComputeIndexTargets(), new indexRecords (Dist)); + // Queue the translations + for (vector::const_iterator I = SectionEntries.begin(); + I != SectionEntries.end(); I++) { + + debTranslationsIndex i = debTranslationsIndex(URI,Dist,(*I)->Section); + i.GetIndexes(Owner); + } + return true; } -- 2.45.2