From 63fc55509fc32466b1027e9e91cc3220ee21a1e0 Mon Sep 17 00:00:00 2001 From: David Kalnischkies Date: Thu, 24 Sep 2009 15:03:55 +0200 Subject: try to be cristal clear about the usage of :: and {} (Closes: #503481) See the bugreport (and merged ones) for discussion details which lead to these additions to the introduction of the apt.conf manpage. --- doc/apt.conf.5.xml | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'doc/apt.conf.5.xml') diff --git a/doc/apt.conf.5.xml b/doc/apt.conf.5.xml index 11c086bf2..cfc09ec1f 100644 --- a/doc/apt.conf.5.xml +++ b/doc/apt.conf.5.xml @@ -86,17 +86,40 @@ DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";}; The names of the configuration items are not case-sensitive. So in the previous example you could use dpkg::pre-install-pkgs. - Two specials are allowed, #include and #clear + Names for the configuration items are optional if a list is defined as it can be see in + the DPkg::Pre-Install-Pkgs example above. If you don't specify a name a + new entry will simply add a new option to the list. If you specify a name you can override + the option as every other option by reassigning a new value to the option. + + Two specials are allowed, #include and #clear: #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 descendants are erased. + specified element and all its descendants are erased. + (Note that these lines also need to end with a semicolon.) + + The #clear command is the only way to delete a list or a complete scope. + Reopening a scope or the ::-style described below will not + override previewsly written entries. Only options can be overridden by adressing a new + value to it - lists and scopes can't be overridden, only cleared. 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 name (APT::Get::Assume-Yes for instance) followed by an equals sign then the new value of the option. Lists can be appended too by adding - a trailing :: to the list name. + a trailing :: to the list name. (As you might suspect: The scope syntax can't be used + on the commandline.) + + Note that you can use :: only for appending one item per line to a list and + that you should not use it in combination with the scope syntax. + (The scope syntax implicit insert ::) Using both syntaxes together will trigger a bug + which some users unfortunately relay on: An option with the unusual name "::" + which acts like every other option with a name. These introduces many problems + including that a user who writes multiple lines in this wrong syntax in + the hope to append to a list will gain the opposite as only the last assignment for this option + "::" will be used. Upcoming APT versions will raise errors and + will stop working if they encounter this misuse, so please correct such statements now + as long as APT doesn't complain explicit about them. The APT Group -- cgit v1.2.3