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">
8 <!ENTITY % aptverbatiment SYSTEM
"apt-verbatim.ent">
16 &apt-author.jgunthorpe;
20 <!-- The last update date -->
21 <date>29 February
2004</date>
25 <refentrytitle>apt-config
</refentrytitle>
26 <manvolnum>8</manvolnum>
27 <refmiscinfo class=
"manual">APT
</refmiscinfo>
30 <!-- Man page title -->
32 <refname>apt-config
</refname>
33 <refpurpose>APT Configuration Query program
</refpurpose>
39 <command>apt-config
</command>
40 <arg><option>-hv
</option></arg>
41 <arg><option>-o=
<replaceable>config string
</replaceable></option></arg>
42 <arg><option>-c=
<replaceable>file
</replaceable></option></arg>
50 <refsect1><title>Description
</title>
51 <para><command>apt-config
</command> is an internal program used by various
52 portions of the APT suite to provide consistent configurability. It accesses
53 the main configuration file
<filename>/etc/apt/apt.conf
</filename> in a
54 manner that is easy to use by scripted applications.
</para>
56 <para>Unless the
<option>-h
</option>, or
<option>--help
</option> option is
57 given one of the commands below must be present.
61 <varlistentry><term>shell
</term>
63 shell is used to access the configuration information from a shell
64 script. It is given pairs of arguments, the first being a shell
65 variable and the second the configuration value to query. As output
66 it lists a series of shell assignments commands for each present value.
67 In a shell script it should be used like:
70 <informalexample><programlisting>
72 RES=`apt-config shell OPTS MyApp::options`
74 </programlisting></informalexample>
76 <para>This will set the shell environment variable $OPTS to the value of
77 MyApp::options with a default of
<option>-f
</option>.
</para>
80 <para>The configuration item may be postfixed with a /[fdbi]. f returns
81 file names, d returns directories, b returns true or false and i returns
82 an integer. Each of the returns is normalized and verified
87 <varlistentry><term>dump
</term>
89 Just show the contents of the configuration space.
</para>
96 <refsect1><title>options
</title>
106 <refsect1><title>See Also
</title>
111 <refsect1><title>Diagnostics
</title>
112 <para><command>apt-config
</command> returns zero on normal operation, decimal
100 on error.