1 <?xml version=
"1.0" encoding=
"utf-8" standalone=
"no"?>
2 <!DOCTYPE refentry PUBLIC
"-//OASIS//DTD DocBook XML V4.2//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
5 <!ENTITY % aptent SYSTEM
"apt.ent">
13 &apt-author.jgunthorpe;
17 <!-- The last update date -->
18 <date>29 February
2004</date>
22 <refentrytitle>apt-config
</refentrytitle>
23 <manvolnum>8</manvolnum>
26 <!-- Man page title -->
28 <refname>apt-config
</refname>
29 <refpurpose>APT Configuration Query program
</refpurpose>
35 <command>apt-config
</command>
36 <arg><option>-hv
</option></arg>
37 <arg><option>-o=
<replaceable>config string
</replaceable></option></arg>
38 <arg><option>-c=
<replaceable>file
</replaceable></option></arg>
46 <refsect1><title>Description
</title>
47 <para><command>apt-config
</command> is an internal program used by various
48 portions of the APT suite to provide consistent configurability. It accesses
49 the main configuration file
<filename>/etc/apt/apt.conf
</filename> in a
50 manner that is easy to use by scripted applications.
</para>
52 <para>Unless the
<option>-h
</option>, or
<option>--help
</option> option is
53 given one of the commands below must be present.
57 <varlistentry><term>shell
</term>
59 shell is used to access the configuration information from a shell
60 script. It is given pairs of arguments, the first being a shell
61 variable and the second the configuration value to query. As output
62 it lists a series of shell assignments commands for each present value.
63 In a shell script it should be used like:
66 <informalexample><programlisting>
68 RES=`apt-config shell OPTS MyApp::options`
70 </programlisting></informalexample>
72 <para>This will set the shell environment variable $OPTS to the value of
73 MyApp::options with a default of
<option>-f
</option>.
</para>
76 <para>The configuration item may be postfixed with a /[fdbi]. f returns
77 file names, d returns directories, b returns true or false and i returns
78 an integer. Each of the returns is normalized and verified
83 <varlistentry><term>dump
</term>
85 Just show the contents of the configuration space.
</para>
92 <refsect1><title>options
</title>
102 <refsect1><title>See Also
</title>
107 <refsect1><title>Diagnostics
</title>
108 <para><command>apt-config
</command> returns zero on normal operation, decimal
100 on error.