summaryrefslogtreecommitdiff
path: root/doc/apt-config.8.sgml
blob: 0f5324e0a7175045b2ca80d9110dbbb1fd28d9de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!-- -*- mode: sgml; mode: fold -*- -->
<!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [

<!ENTITY % aptent SYSTEM "apt.ent">
%aptent;

]>

<refentry>
 &apt-docinfo;
 
 <refmeta>
   <refentrytitle>apt-config</>
   <manvolnum>8</>
 </refmeta>
 
 <!-- Man page title -->
 <refnamediv>
    <refname>apt-config</>
    <refpurpose>APT Configuration Query program</>
 </refnamediv>

 <!-- Arguments -->
 <refsynopsisdiv>
   <cmdsynopsis>
      <command>apt-config</>
      <arg><option>-hv</></arg>
      <arg><option>-o=<replaceable/config string/</></arg>
      <arg><option>-c=<replaceable/file/</></arg>
      <group choice=req>
         <arg>shell</>
         <arg>dump</>
      </group>   
   </cmdsynopsis>
 </refsynopsisdiv>
 
 <RefSect1><Title>Description</>
   <para>
   <command/apt-config/ is an internal program used by various portions of
   the APT suite to provide consistent configurability. It accesses the main 
   configuarion file <filename>/etc/apt/apt.conf</> in a manner that is 
   easy to use by scripted applications.
   <para>
   Unless the <option/-h/, or <option/--help/ option is given one of the above commands
   must be present.   
   </para>
   
   <VariableList>
     <VarListEntry><Term>shell</Term>
     <ListItem><Para>
     shell is used to access the configuration information from a shell 
     script. It is given pairs of arguments, the first being a shell 
     variable and the second the configuration value to query. As output 
     it lists a series of shell assignments commands for each present value. 
     In a shell script it should be used like:
     </para>
     
<informalexample><programlisting>
OPTS="-f"
RES=`apt-config shell OPTS MyApp::Options`
eval $RES
</programlisting></informalexample>

     <para>
     This will set the shell environment variable $OPTS to the value of
     MyApp::Options with a default of <option/-f/.
     
     <para>
     The configuration item may be postfixed with a /[fdbi]. f returns file
     names, d returns directories, b returns true or false and i returns an 
     integer. Each of the returns is normalized and verified internally.
     </VarListEntry>

     <VarListEntry><Term>dump</Term>
     <ListItem><Para>
     Just show the contents of the configuration space.
     </VarListEntry>

   </VariableList>
 </RefSect1>

 <RefSect1><Title>Options</>
   &apt-cmdblurb;
   
   <VariableList>
   
     &apt-commonoptions;
     
   </VariableList>
 </RefSect1>

 <RefSect1><Title>See Also</>
   <para>
   &apt-conf;
 </RefSect1>

 <RefSect1><Title>Diagnostics</>
   <para>
   <command/apt-config/ returns zero on normal operation, decimal 100 on error.
 </RefSect1>

 &manbugs;
 &manauthor;
 
</refentry>