]> git.saurik.com Git - apt.git/commitdiff
use pdiff for Translation-* files if available (Closes: #657902)
authorDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 18 Feb 2012 18:48:04 +0000 (19:48 +0100)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Sat, 18 Feb 2012 18:48:04 +0000 (19:48 +0100)
Beware: pdiffs for Translation-* are only acquired if their
availability is advertised in the Release file.

apt-pkg/acquire-item.cc
debian/changelog

index ca40b0bd77b2e30ec23fac6340076bd4c3377d80..4e6fb7ff9718ecbf95502a3e3b1fd27a5902ca7b 100644 (file)
@@ -1395,7 +1395,12 @@ void pkgAcqMetaIndex::QueueIndexes(bool verify)                          /*{{{*/
                                (*Target)->ShortDesc, ExpectedIndexHash);
         else if (transInRelease == false || MetaIndexParser->Exists((*Target)->MetaKey) == true)
         {
                                (*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;
       }
         }
         continue;
       }
index 35a476d5ff1fab4cf2c3596cbf4f930acdaf79b9..9e23311b6a2f2a97c021bf4861361eacb7548cdb 100644 (file)
@@ -30,6 +30,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
   * apt-pkg/acquire-item.cc:
     - drop support for i18n/Index file (introduced in 0.8.11) and use
       the Release file instead to get the Translations (Closes: #649314)
   * apt-pkg/acquire-item.cc:
     - drop support for i18n/Index file (introduced in 0.8.11) and use
       the Release file instead to get the Translations (Closes: #649314)
+    - use pdiff for Translation-* files if available (Closes: #657902)
   * ftparchive/writer.cc:
     - add 'Translation-*' to the default patterns
 
   * ftparchive/writer.cc:
     - add 'Translation-*' to the default patterns
 
@@ -54,7 +55,7 @@ apt (0.8.16~exp13) UNRELEASED; urgency=low
   * apt-pkg/contrib/fileutl.h:
     - fix compat with FileFd::OpenDescriptor() in ReadOnlyGzip mode
 
   * apt-pkg/contrib/fileutl.h:
     - fix compat with FileFd::OpenDescriptor() in ReadOnlyGzip mode
 
- -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 18 Feb 2012 19:23:42 +0100
+ -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 18 Feb 2012 19:44:16 +0100
 
 apt (0.8.16~exp12) experimental; urgency=low
 
 
 apt (0.8.16~exp12) experimental; urgency=low