apt-config.8.sgml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. <!-- -*- mode: sgml; mode: fold -*- -->
  2. <!doctype refentry PUBLIC "-//OASIS//DTD DocBook V3.1//EN" [
  3. <!ENTITY % aptent SYSTEM "apt.ent">
  4. %aptent;
  5. ]>
  6. <refentry>
  7. &apt-docinfo;
  8. <refmeta>
  9. <refentrytitle>apt-config</>
  10. <manvolnum>8</>
  11. </refmeta>
  12. <!-- Man page title -->
  13. <refnamediv>
  14. <refname>apt-config</>
  15. <refpurpose>APT Configuration Query program</>
  16. </refnamediv>
  17. <!-- Arguments -->
  18. <refsynopsisdiv>
  19. <cmdsynopsis>
  20. <command>apt-config</>
  21. <arg><option>-hv</></arg>
  22. <arg><option>-o=<replaceable/config string/</></arg>
  23. <arg><option>-c=<replaceable/file/</></arg>
  24. <group choice=req>
  25. <arg>shell</>
  26. <arg>dump</>
  27. </group>
  28. </cmdsynopsis>
  29. </refsynopsisdiv>
  30. <RefSect1><Title>Description</>
  31. <para>
  32. <command/apt-config/ is an internal program used by various portions of
  33. the APT suite to provide consistent configurability. It accesses the main
  34. configuration file <filename>/etc/apt/apt.conf</> in a manner that is
  35. easy to use by scripted applications.
  36. <para>
  37. Unless the <option/-h/, or <option/--help/ option is given one of the
  38. commands below must be present.
  39. </para>
  40. <VariableList>
  41. <VarListEntry><Term>shell</Term>
  42. <ListItem><Para>
  43. shell is used to access the configuration information from a shell
  44. script. It is given pairs of arguments, the first being a shell
  45. variable and the second the configuration value to query. As output
  46. it lists a series of shell assignments commands for each present value.
  47. In a shell script it should be used like:
  48. </para>
  49. <informalexample><programlisting>
  50. OPTS="-f"
  51. RES=`apt-config shell OPTS MyApp::Options`
  52. eval $RES
  53. </programlisting></informalexample>
  54. <para>
  55. This will set the shell environment variable $OPTS to the value of
  56. MyApp::Options with a default of <option/-f/.
  57. <para>
  58. The configuration item may be postfixed with a /[fdbi]. f returns file
  59. names, d returns directories, b returns true or false and i returns an
  60. integer. Each of the returns is normalized and verified internally.
  61. </VarListEntry>
  62. <VarListEntry><Term>dump</Term>
  63. <ListItem><Para>
  64. Just show the contents of the configuration space.
  65. </VarListEntry>
  66. </VariableList>
  67. </RefSect1>
  68. <RefSect1><Title>Options</>
  69. &apt-cmdblurb;
  70. <VariableList>
  71. &apt-commonoptions;
  72. </VariableList>
  73. </RefSect1>
  74. <RefSect1><Title>See Also</>
  75. <para>
  76. &apt-conf;
  77. </RefSect1>
  78. <RefSect1><Title>Diagnostics</>
  79. <para>
  80. <command/apt-config/ returns zero on normal operation, decimal 100 on error.
  81. </RefSect1>
  82. &manbugs;
  83. &manauthor;
  84. </refentry>