database.cc 1003 B

123456789101112131415161718192021222324252627282930313233343536
  1. // -*- mode: cpp; mode: fold -*-
  2. // Description /*{{{*/
  3. // $Id: database.cc,v 1.2 2001/02/20 07:03:16 jgg Exp $
  4. /* ######################################################################
  5. Data Base Abstraction
  6. ##################################################################### */
  7. /*}}}*/
  8. // Include Files /*{{{*/
  9. #include<config.h>
  10. #include <apt-pkg/database.h>
  11. #include <apt-pkg/filelist.h>
  12. #include <apt-pkg/pkgcachegen.h>
  13. /*}}}*/
  14. // DataBase::GetMetaTmp - Get the temp dir /*{{{*/
  15. // ---------------------------------------------------------------------
  16. /* This re-initializes the meta temporary directory if it hasn't yet
  17. been inited for this cycle. The flag is the emptyness of MetaDir */
  18. bool pkgDataBase::GetMetaTmp(std::string &Dir)
  19. {
  20. if (MetaDir.empty() == true)
  21. if (InitMetaTmp(MetaDir) == false)
  22. return false;
  23. Dir = MetaDir;
  24. return true;
  25. }
  26. /*}}}*/
  27. pkgDataBase::~pkgDataBase()
  28. {
  29. delete Cache;
  30. delete FList;
  31. }