From 18593cf75189c0d6d3cbbf729013c875398218ca Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 29 Oct 2014 16:32:42 +0100 Subject: Only support Translation-* that are listed in the {In,}Release file Handle Translation-* files exactly like Packages files (with the expection that it is ok if a download of them fails). Remove all "guessing" on apts side. This will elimimnate a bunch of errors releated to captive portals and similar. Its also more correct and removes another potential attack vector. --- apt-pkg/deb/debindexfile.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index cc1d94d81..779c74abf 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -458,9 +458,9 @@ string debTranslationsIndex::IndexURI(const char *Type) const bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const { string const TranslationFile = string("Translation-").append(Language); - new pkgAcqIndexTrans(Owner, IndexURI(Language), - Info(TranslationFile.c_str()), - TranslationFile); + new pkgAcqIndex(Owner, IndexURI(Language), + Info(TranslationFile.c_str()), + TranslationFile, HashStringList()); return true; } -- cgit v1.2.3 From 87ecd6a2d719aeaeedd99dd500b467e966376f1c Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 5 Nov 2014 17:45:37 +0100 Subject: apt-pkg/deb/debindexfile.{cc,h}: kill GetIndexes() --- apt-pkg/deb/debindexfile.cc | 13 ------------- apt-pkg/deb/debindexfile.h | 1 - 2 files changed, 14 deletions(-) (limited to 'apt-pkg/deb') diff --git a/apt-pkg/deb/debindexfile.cc b/apt-pkg/deb/debindexfile.cc index 779c74abf..335f9d36e 100644 --- a/apt-pkg/deb/debindexfile.cc +++ b/apt-pkg/deb/debindexfile.cc @@ -452,19 +452,6 @@ string debTranslationsIndex::IndexURI(const char *Type) const return Res; } /*}}}*/ -// TranslationsIndex::GetIndexes - Fetch the index files /*{{{*/ -// --------------------------------------------------------------------- -/* */ -bool debTranslationsIndex::GetIndexes(pkgAcquire *Owner) const -{ - string const TranslationFile = string("Translation-").append(Language); - new pkgAcqIndex(Owner, IndexURI(Language), - Info(TranslationFile.c_str()), - TranslationFile, HashStringList()); - - return true; -} - /*}}}*/ // TranslationsIndex::Describe - Give a descriptive path to the index /*{{{*/ // --------------------------------------------------------------------- /* This should help the user find the index in the sources.list and diff --git a/apt-pkg/deb/debindexfile.h b/apt-pkg/deb/debindexfile.h index e5a1a7873..d727d9547 100644 --- a/apt-pkg/deb/debindexfile.h +++ b/apt-pkg/deb/debindexfile.h @@ -114,7 +114,6 @@ class debTranslationsIndex : public pkgIndexFile // Interface for acquire virtual std::string Describe(bool Short) const; - virtual bool GetIndexes(pkgAcquire *Owner) const; // Interface for the Cache Generator virtual bool Exists() const; -- cgit v1.2.3