]> git.saurik.com Git - apt.git/blame - doc/apt-config.8.xml
support setting empty values (sanely) & removing support for
[apt.git] / doc / apt-config.8.xml
CommitLineData
24f6490f 1<?xml version="1.0" encoding="utf-8" standalone="no"?>
81cf16a2
DK
2<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
5abbf5bb
DK
4<!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
5<!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
6<!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
24f6490f
AL
7]>
8
9<refentry>
5e80de29
AL
10
11 <refentryinfo>
12 &apt-author.jgunthorpe;
13 &apt-author.team;
14 &apt-email;
15 &apt-product;
16 <!-- The last update date -->
dabb215c 17 <date>2012-06-09T00:00:00Z</date>
5e80de29 18 </refentryinfo>
24f6490f
AL
19
20 <refmeta>
21 <refentrytitle>apt-config</refentrytitle>
22 <manvolnum>8</manvolnum>
f0599b9c 23 <refmiscinfo class="manual">APT</refmiscinfo>
24f6490f
AL
24 </refmeta>
25
26 <!-- Man page title -->
27 <refnamediv>
28 <refname>apt-config</refname>
29 <refpurpose>APT Configuration Query program</refpurpose>
30 </refnamediv>
31
6e8b4572
DK
32 &synopsis-command-apt-config;
33
24f6490f
AL
34 <refsect1><title>Description</title>
35 <para><command>apt-config</command> is an internal program used by various
36 portions of the APT suite to provide consistent configurability. It accesses
37 the main configuration file <filename>/etc/apt/apt.conf</filename> in a
4b2dad2e 38 manner that is easy to use for scripted applications.</para>
24f6490f
AL
39
40 <para>Unless the <option>-h</option>, or <option>--help</option> option is
aec22160 41 given, one of the commands below must be present.
24f6490f
AL
42 </para>
43
44 <variablelist>
2b9b27c3 45 <varlistentry><term><option>shell</option></term>
24f6490f 46 <listitem><para>
4b2dad2e
JR
47 shell is used to access the configuration information from a shell
48 script. It is given pairs of arguments, the first being a shell
49 variable and the second the configuration value to query. As output
50 it lists shell assignment commands for each value present.
51 In a shell script it should be used as follows:
24f6490f
AL
52 </para>
53
54<informalexample><programlisting>
55OPTS="-f"
56RES=`apt-config shell OPTS MyApp::options`
57eval $RES
58</programlisting></informalexample>
59
60 <para>This will set the shell environment variable $OPTS to the value of
61 MyApp::options with a default of <option>-f</option>.</para>
62
63
64 <para>The configuration item may be postfixed with a /[fdbi]. f returns
65 file names, d returns directories, b returns true or false and i returns
66 an integer. Each of the returns is normalized and verified
67 internally.</para>
68 </listitem>
69 </varlistentry>
70
2b9b27c3 71 <varlistentry><term><option>dump</option></term>
24f6490f
AL
72 <listitem><para>
73 Just show the contents of the configuration space.</para>
74 </listitem>
75 </varlistentry>
76
77 </variablelist>
78 </refsect1>
79
80 <refsect1><title>options</title>
81 &apt-cmdblurb;
82
83 <variablelist>
a8813606
DK
84 <varlistentry>
85 <term><option>--empty</option></term>
86 <listitem><para>Include options which have an empty value. This is the default, so
87 use --no-empty to remove them from the output.</para></listitem>
88 </varlistentry>
89
90 <varlistentry>
91 <term><option>--format '<replaceable>&percnt;f &#x0022;&percnt;v&#x0022;;&percnt;n</replaceable>'</option></term>
4b2dad2e
JR
92 <listitem><para>Defines the output of each config option. &percnt;t will be replaced with its individual name,
93 &percnt;f with its full hierarchical name and &percnt;v with its value.
c086ac18 94 Use uppercase letters and special characters in the value will be encoded to ensure that
4b2dad2e
JR
95 it can e.g. be safely used in a quoted-string as defined by RFC822. Additionally
96 &percnt;n will be replaced by a newline, and &percnt;N by a tab. A &percnt; can be
a8813606
DK
97 printed by using &percnt;&percnt;.</para></listitem>
98 </varlistentry>
99
24f6490f
AL
100 &apt-commonoptions;
101
102 </variablelist>
103 </refsect1>
104
105 <refsect1><title>See Also</title>
5e80de29 106 <para>&apt-conf;
24f6490f
AL
107 </para>
108 </refsect1>
109
110 <refsect1><title>Diagnostics</title>
111 <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
112 </para>
113 </refsect1>
114
115 &manbugs;
24f6490f
AL
116
117</refentry>
118