init.cc 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: init.cc,v 1.4 1998/07/26 04:49:26 jgg Exp $
  4. /* ######################################################################
  5. Init - Initialize the package library
  6. ##################################################################### */
  7. /*}}}*/
  8. // Include files /*{{{*/
  9. #include <apt-pkg/init.h>
  10. /*}}}*/
  11. // pkgInitialize - Initialize the configuration class /*{{{*/
  12. // ---------------------------------------------------------------------
  13. /* Directories are specified in such a way that the FindDir function will
  14. understand them. That is, if they don't start with a / then their parent
  15. is prepended, this allows a fair degree of flexability. */
  16. bool pkgInitialize(Configuration &Cnf)
  17. {
  18. // General APT things
  19. Cnf.Set("APT::Architecture","i386");
  20. // State
  21. Cnf.Set("Dir::State","/var/state/apt/");
  22. Cnf.Set("Dir::State::lists","lists/");
  23. /* These really should be jammed into a generic 'Local Database' engine
  24. which is yet to be determined. The functions in pkgcachegen should
  25. be the only users of these */
  26. Cnf.Set("Dir::State::xstatus","xstatus");
  27. Cnf.Set("Dir::State::userstatus","status.user");
  28. Cnf.Set("Dir::State::status","/var/lib/dpkg/status");
  29. // Cache
  30. Cnf.Set("Dir::Cache","/tmp/");
  31. Cnf.Set("Dir::Cache::archives","archives/");
  32. Cnf.Set("Dir::Cache::srcpkgcache","srcpkgcache");
  33. Cnf.Set("Dir::Cache::pkgcache","pkgcache");
  34. // Configuration
  35. Cnf.Set("Dir::Etc","/etc/apt/");
  36. Cnf.Set("Dir::Etc::sourcelist","sources.list");
  37. Cnf.Set("Dir::Etc::main","apt.conf");
  38. return true;
  39. }
  40. /*}}}*/