From 8bd02d8bd6bc46bc38924635afc09fdde50b6bf5 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Tue, 8 Sep 2009 15:02:15 +0200 Subject: Rework the CompressionTypes system by adding an Order subgroup to simplify customisation of the order and improve the documentation about this setting group. --- doc/apt.conf.5.xml | 32 +++++++++++++++++++++++--------- doc/examples/configure-index | 9 +++++++++ 2 files changed, 32 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index e0ce0db40..92ac5ec04 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -90,7 +90,7 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; #include will include the given file, unless the filename ends in a slash, then the whole directory is included. #clear is used to erase a part of the configuration tree. The - specified element and all its descendents are erased. + specified element and all its descendants are erased. All of the APT tools take a -o option which allows an arbitrary configuration directive to be specified on the command line. The syntax is a full option @@ -312,16 +312,30 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; CompressionTypes List of compression types which are understood by the acquire methods. Files like Packages can be available in various compression formats. - This list defines in which order the acquire methods will try to download these files. - Per default bzip2 compressed files will be prefered over - lzma, gzip and uncompressed files. The syntax for - the configuration fileentry is + Per default the acquire methods can decompress bzip2, lzma + and gzip compressed files, with this setting more formats can be added + on the fly or the used method can be changed. The syntax for this is: Acquire::CompressionTypes::FileExtension "Methodname"; - e.g. Acquire::CompressionTypes::bz2 "bzip2"; - Note that at runtime the Dir::Bin::Methodname will + Also the Order subgroup can be used to define in which order + the acquire system will try to download the compressed files. The acquire system will try the first + and proceed with the next compression type in this list on error, so to prefer one over the other type + simple add the preferred type at first - not already added default types will be added at run time + to the end of the list, so e.g. Acquire::CompressionTypes::Order:: "gz"; can + be used to prefer gzip compressed files over bzip2 and lzma. + If lzma should be preferred over gzip and bzip2 the + configure setting should look like this Acquire::CompressionTypes::Order { "lzma"; "gz"; }; + It is not needed to add bz2 explicit to the list as it will be added automatic. + Note that at run time the Dir::Bin::Methodname will be checked: If this setting exists the method will only be used if this file exists, e.g. for - the bzip2 method above (the inbuilt) setting is Dir::Bin::bzip2 "/bin/bzip2"; - + the bzip2 method (the inbuilt) setting is Dir::Bin::bzip2 "/bin/bzip2"; + Note also that list entries specified on the commandline will be added at the end of the list + specified in the configuration files, but before the default entries. To prefer a type in this case + over the ones specified in in the configuration files you can set the option direct - not in list style. + This will not override the defined list, it will only prefix the list with this type. + While it is possible to add an empty compression type to the order list, but APT in its current + version doesn't understand it correctly and will display many warnings about not downloaded files - + these warnings are most of the time false negatives. Future versions will maybe include a way to + really prefer uncompressed files to support the usage of local mirrors. diff --git a/doc/examples/configure-index b/doc/examples/configure-index index 5dc7b5246..8025fa4b4 100644 --- a/doc/examples/configure-index +++ b/doc/examples/configure-index @@ -246,6 +246,15 @@ Acquire { Options {"--ignore-time-conflict";} // not very useful on a normal system }; + + CompressionTypes + { + bz2 "bzip2"; + lzma "lzma"; + gz "gzip"; + + Order { "gz"; "lzma"; "bz2"; }; + }; }; // Directory layout -- cgit v1.2.3