apt-config.8.xml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  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" [
  4. <!ENTITY % aptent SYSTEM "apt.ent">
  5. %aptent;
  6. ]>
  7. <refentry>
  8. <refentryinfo>
  9. &apt-author.jgunthorpe;
  10. &apt-author.team;
  11. &apt-email;
  12. &apt-product;
  13. <!-- The last update date -->
  14. <date>29 February 2004</date>
  15. </refentryinfo>
  16. <refmeta>
  17. <refentrytitle>apt-config</refentrytitle>
  18. <manvolnum>8</manvolnum>
  19. </refmeta>
  20. <!-- Man page title -->
  21. <refnamediv>
  22. <refname>apt-config</refname>
  23. <refpurpose>APT Configuration Query program</refpurpose>
  24. </refnamediv>
  25. <!-- Arguments -->
  26. <refsynopsisdiv>
  27. <cmdsynopsis>
  28. <command>apt-config</command>
  29. <arg><option>-hv</option></arg>
  30. <arg><option>-o=<replaceable>config string</replaceable></option></arg>
  31. <arg><option>-c=<replaceable>file</replaceable></option></arg>
  32. <group choice="req">
  33. <arg>shell</arg>
  34. <arg>dump</arg>
  35. </group>
  36. </cmdsynopsis>
  37. </refsynopsisdiv>
  38. <refsect1><title>Description</title>
  39. <para><command>apt-config</command> is an internal program used by various
  40. portions of the APT suite to provide consistent configurability. It accesses
  41. the main configuration file <filename>/etc/apt/apt.conf</filename> in a
  42. manner that is easy to use by scripted applications.</para>
  43. <para>Unless the <option>-h</option>, or <option>--help</option> option is
  44. given one of the commands below must be present.
  45. </para>
  46. <variablelist>
  47. <varlistentry><term>shell</term>
  48. <listitem><para>
  49. shell is used to access the configuration information from a shell
  50. script. It is given pairs of arguments, the first being a shell
  51. variable and the second the configuration value to query. As output
  52. it lists a series of shell assignments commands for each present value.
  53. In a shell script it should be used like:
  54. </para>
  55. <informalexample><programlisting>
  56. OPTS="-f"
  57. RES=`apt-config shell OPTS MyApp::options`
  58. eval $RES
  59. </programlisting></informalexample>
  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. <para>The configuration item may be postfixed with a /[fdbi]. f returns
  63. file names, d returns directories, b returns true or false and i returns
  64. an integer. Each of the returns is normalized and verified
  65. internally.</para>
  66. </listitem>
  67. </varlistentry>
  68. <varlistentry><term>dump</term>
  69. <listitem><para>
  70. Just show the contents of the configuration space.</para>
  71. </listitem>
  72. </varlistentry>
  73. </variablelist>
  74. </refsect1>
  75. <refsect1><title>options</title>
  76. &apt-cmdblurb;
  77. <variablelist>
  78. &apt-commonoptions;
  79. </variablelist>
  80. </refsect1>
  81. <refsect1><title>See Also</title>
  82. <para>&apt-conf;
  83. </para>
  84. </refsect1>
  85. <refsect1><title>Diagnostics</title>
  86. <para><command>apt-config</command> returns zero on normal operation, decimal 100 on error.
  87. </para>
  88. </refsect1>
  89. &manbugs;
  90. </refentry>