[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt.conf syntax clarification



Hi, everyone.

I recently read apt.conf(1) man page and find it a bit confusing about
terms. As i understand all below statements are correct (they start
from obvious and then go to some my thoughts and conclusions):

    - Option may have a name or may have not (see below).
    - Option with name may be assigned a value. This value may be overriden by
      reassigning [5].
    - Scope is a group of options enclosed in curly braces [2]. This group
      can't be overriden by opening it again - only cleared with '#clear' [5],
      [6].
    - Scope is an option itself (it can be assigned a value) [7]. Value of
      scope itself can be overriden like value of any other option [test].
    - Hence, option - is a scope (any option may have child options)
      [conclusion from above].
    - List is a group of values [3].
    - List is a group of nameless options [4].
    - List is a scope containing nameless options [conclusion from above]. It
      also can't be overriden by opening it again - only cleared with '#clear'
      [5], [6].

[1]: apt.conf(1):
        "The configuration file is organized in a tree with options organized
        into functional groups."

[2]: apt.conf(1):
        "A new scope can be opened with curly braces"

[3]: apt.conf(1):
        "Lists can be created by opening a scope and including a single string
        enclosed in quotes followed by a semicolon. Multiple entries can be
        included, each separated by a semicolon."

[4]: apt.conf(1):
        "..
                DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-preconfigure --apt";};
        ..
        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."

[5]: apt.conf(1):
        "Only options can be overridden by addressing a new value to it -
        lists and scopes can't be overridden, only cleared."

[6]: apt.conf(1):
        "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 previously written entries."

[7]: /usr/share/doc/apt/examples/configure-index.gz:
        Dir "/"
        {
          // Location of the state dir
          State "var/lib/apt/"
          {
             Lists "lists/";
             status "/var/lib/dpkg/status";
             extended_states "extended_states";
             cdroms "cdroms.list";
          };
        ..
        };

Am i right?

--
    Dmitriy Matrosov


Reply to: