Просмотр исходного кода

* cmdline/apt-config.cc:
- dump the APT::Compressor settings correctly and completely

David Kalnischkies лет назад: 14
Родитель
Сommit
8e16d8c394
2 измененных файлов с 23 добавлено и 4 удалено
  1. 16 0
      cmdline/apt-config.cc
  2. 7 4
      debian/changelog

+ 16 - 0
cmdline/apt-config.cc

@@ -134,6 +134,22 @@ int main(int argc,const char *argv[])					/*{{{*/
    for (std::vector<std::string>::const_iterator a = archs.begin(); a != archs.end(); ++a)
    for (std::vector<std::string>::const_iterator a = archs.begin(); a != archs.end(); ++a)
       _config->Set("APT::Architectures::", *a);
       _config->Set("APT::Architectures::", *a);
 
 
+   std::vector<APT::Configuration::Compressor> const compressors = APT::Configuration::getCompressors();
+   _config->Clear("APT::Compressor");
+   string conf = "APT::Compressor::";
+   for (std::vector<APT::Configuration::Compressor>::const_iterator c = compressors.begin(); c != compressors.end(); ++c)
+   {
+      string comp = conf + c->Name + "::";
+      _config->Set(comp + "Name", c->Name);
+      _config->Set(comp + "Extension", c->Extension);
+      _config->Set(comp + "Binary", c->Binary);
+      _config->Set(std::string(comp + "Cost").c_str(), c->Cost);
+      for (std::vector<std::string>::const_iterator a = c->CompressArgs.begin(); a != c->CompressArgs.end(); ++a)
+	 _config->Set(comp + "CompressArg::", *a);
+      for (std::vector<std::string>::const_iterator a = c->UncompressArgs.begin(); a != c->UncompressArgs.end(); ++a)
+	 _config->Set(comp + "UncompressArg::", *a);
+   }
+
    // Match the operation
    // Match the operation
    CmdL.DispatchArg(Cmds);
    CmdL.DispatchArg(Cmds);
    
    

+ 7 - 4
debian/changelog

@@ -1,16 +1,17 @@
+
 apt (0.8.16~exp9) UNRELEASED; urgency=low
 apt (0.8.16~exp9) UNRELEASED; urgency=low
 
 
   [ Julian Andres Klode ]
   [ Julian Andres Klode ]
   * apt-pkg/cdrom.cc:
   * apt-pkg/cdrom.cc:
     - Accept .bz2, .xz files in addition to .gz files (Closes: #649451)
     - Accept .bz2, .xz files in addition to .gz files (Closes: #649451)
-  
+
   [ Michael Vogt ]
   [ Michael Vogt ]
   * apt-pkg/cdrom.cc:
   * apt-pkg/cdrom.cc:
     - use aptconfiguration to get the supported compression types
     - use aptconfiguration to get the supported compression types
   * debian/control:
   * debian/control:
     - bump debhelper build-dep to debhelper (>= 8.1.3~)
     - bump debhelper build-dep to debhelper (>= 8.1.3~)
     - set libapt-pkg-dev to multi-arch: same too
     - set libapt-pkg-dev to multi-arch: same too
- 
+
   [ Colin Watson ]
   [ Colin Watson ]
   * Convert libapt-pkg4.12 and libapt-inst1.4 to Multi-Arch: same.
   * Convert libapt-pkg4.12 and libapt-inst1.4 to Multi-Arch: same.
 
 
@@ -27,8 +28,10 @@ apt (0.8.16~exp9) UNRELEASED; urgency=low
   * cmdline/apt-get.cc:
   * cmdline/apt-get.cc:
     - ignore foreign architectures if we check if a provides has only one
     - ignore foreign architectures if we check if a provides has only one
       resolver as it's basically the same for the user, so no need to choose
       resolver as it's basically the same for the user, so no need to choose
-  
- -- Julian Andres Klode <jak@debian.org>  Mon, 21 Nov 2011 18:46:36 +0100
+  * cmdline/apt-config.cc:
+    - dump the APT::Compressor settings correctly and completely
+
+ -- David Kalnischkies <kalnischkies@gmail.com>  Sat, 10 Dec 2011 17:34:50 +0100
 
 
 apt (0.8.16~exp8) experimental; urgency=low
 apt (0.8.16~exp8) experimental; urgency=low