]> git.saurik.com Git - apt.git/commitdiff
* apt-pkg/deb/debindexfile.cc:
authormartin@piware.de <>
Wed, 9 Jun 2010 12:09:42 +0000 (14:09 +0200)
committermartin@piware.de <>
Wed, 9 Jun 2010 12:09:42 +0000 (14:09 +0200)
  - If we do not find uncompressed package/source/translation indexes, look
    for gzip compressed ones.

apt-pkg/deb/debindexfile.cc
debian/changelog

index 7379ca997010782b3556761b93fa4a9ec8f61d77..e87c21f135d88a4b87e33fd0ac823c8da64c4afc 100644 (file)
@@ -106,8 +106,14 @@ string debSourcesIndex::Info(const char *Type) const
 /* */
 inline string debSourcesIndex::IndexFile(const char *Type) const
 {
-   return URItoFileName(IndexURI(Type));
+   string s = URItoFileName(IndexURI(Type));
+   string sgzip = s + ".gz";
+   if (!FileExists(s) && FileExists(sgzip))
+       return sgzip;
+   else
+       return s;
 }
+
 string debSourcesIndex::IndexURI(const char *Type) const
 {
    string Res;
@@ -213,7 +219,12 @@ string debPackagesIndex::Info(const char *Type) const
 /* */
 inline string debPackagesIndex::IndexFile(const char *Type) const
 {
-   return _config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type));
+   string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type));
+   string sgzip = s + ".gz";
+   if (!FileExists(s) && FileExists(sgzip))
+       return sgzip;
+   else
+       return s;
 }
 string debPackagesIndex::IndexURI(const char *Type) const
 {
@@ -340,7 +351,12 @@ debTranslationsIndex::debTranslationsIndex(string URI,string Dist,string Section
 /* */
 inline string debTranslationsIndex::IndexFile(const char *Type) const
 {
-   return _config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type));
+   string s =_config->FindDir("Dir::State::lists") + URItoFileName(IndexURI(Type));
+   string sgzip = s + ".gz";
+   if (!FileExists(s) && FileExists(sgzip))
+       return sgzip;
+   else
+       return s;
 }
 string debTranslationsIndex::IndexURI(const char *Type) const
 {
index 2fba94d7cd45a7a1b958f2155aed758ee51b013e..80c504b99a47ca1eecbcced9c2063c0c81b9f1a1 100644 (file)
@@ -8,6 +8,9 @@ apt (0.7.26~exp5) UNRELEASED; urgency=low
   * apt-pkg/contrib/fileutl.{h,cc}:
     - Add support for transparent reading of gzipped files.
     - Link against zlib (in apt-pkg/makefile) and add zlib build dependency.
+  * apt-pkg/deb/debindexfile.cc:
+    - If we do not find uncompressed package/source/translation indexes, look
+      for gzip compressed ones.
 
  -- Christian Perrier <bubulle@debian.org>  Tue, 11 May 2010 19:52:00 +0200