1 <!-- -*- mode: sgml; mode: fold -*- -->
2 <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
4 <!ENTITY % aptent SYSTEM "apt.ent">
13 <refentrytitle>apt-config</>
17 <!-- Man page title -->
19 <refname>apt-config</>
20 <refpurpose>APT Configuration Query program</>
26 <command>apt-config</>
27 <arg><option>-hv</></arg>
28 <arg><option>-o=<replaceable/config string/</></arg>
29 <arg><option>-c=<replaceable/file/</></arg>
37 <RefSect1><Title>Description</>
39 <command/apt-config/ is an internal program used by various portions of
40 the APT suite to provide consistent configurability. It accesses the main
41 configuration file <filename>/etc/apt/apt.conf</> in a manner that is
42 easy to use by scripted applications.
44 Unless the <option/-h/, or <option/--help/ option is given one of the
45 commands below must be present.
49 <VarListEntry><Term>shell</Term>
51 shell is used to access the configuration information from a shell
52 script. It is given pairs of arguments, the first being a shell
53 variable and the second the configuration value to query. As output
54 it lists a series of shell assignments commands for each present value.
55 In a shell script it should be used like:
58 <informalexample><programlisting>
60 RES=`apt-config shell OPTS MyApp::Options`
62 </programlisting></informalexample>
65 This will set the shell environment variable $OPTS to the value of
66 MyApp::Options with a default of <option/-f/.
69 The configuration item may be postfixed with a /[fdbi]. f returns file
70 names, d returns directories, b returns true or false and i returns an
71 integer. Each of the returns is normalized and verified internally.
74 <VarListEntry><Term>dump</Term>
76 Just show the contents of the configuration space.
82 <RefSect1><Title>Options</>
92 <RefSect1><Title>See Also</>
97 <RefSect1><Title>Diagnostics</>
99 <command/apt-config/ returns zero on normal operation, decimal 100 on error.