apt  2.2.4
About: Apt (Advanced Package Tool) is a management system for software packages (Debian/Ubuntu). Release series 2.2.
  Fossies Dox: apt-2.2.4.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

private-install.h
Go to the documentation of this file.
1 #ifndef APT_PRIVATE_INSTALL_H
2 #define APT_PRIVATE_INSTALL_H
3 
4 #include <apt-pkg/cachefile.h>
5 #include <apt-pkg/cacheset.h>
6 #include <apt-pkg/configuration.h>
7 #include <apt-pkg/macros.h>
8 #include <apt-pkg/pkgcache.h>
9 
10 #include <list>
11 #include <string>
12 #include <utility>
13 
14 class CacheFile;
15 class CommandLine;
16 class pkgProblemResolver;
17 
19 
20 struct PseudoPkg
21 {
22  std::string name;
23  std::string arch;
24  std::string release;
25  ssize_t index;
26  PseudoPkg(std::string const &n, std::string const &a, std::string const &r) : name(n), arch(a), release(r), index(-1) {}
27  PseudoPkg(std::string const &n, std::string const &a, std::string const &r, ssize_t i) : name(n), arch(a), release(r), index(i) {}
28 };
29 std::vector<PseudoPkg> GetAllPackagesAsPseudo(pkgSourceList *const SL, CommandLine &CmdL, bool (*Add)(pkgSourceList *const, PseudoPkg &&, std::vector<PseudoPkg> &), std::string const &pseudoArch);
30 std::vector<PseudoPkg> GetPseudoPackages(pkgSourceList *const SL, CommandLine &CmdL, bool (*Add)(pkgSourceList *const, PseudoPkg &&, std::vector<PseudoPkg> &), std::string const &pseudoArch);
31 bool AddVolatileBinaryFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector<PseudoPkg> &VolatileCmdL);
32 bool AddVolatileSourceFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector<PseudoPkg> &VolatileCmdL);
33 
34 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg> &VolatileCmdL, CacheFile &Cache,
35  std::map<unsigned short, APT::VersionSet> &verset, int UpgradeMode, std::set<std::string> &UnknownPackages);
36 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<PseudoPkg> &VolatileCmdL, CacheFile &Cache, int UpgradeMode);
38 
39 APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
40  bool Safety = true);
41 
42 bool CheckNothingBroken(CacheFile &Cache);
43 bool DoAutomaticRemove(CacheFile &Cache);
44 
45 // TryToInstall - Mark a package for installation /*{{{*/
46 struct TryToInstall {
49  bool FixBroken;
50  unsigned long AutoMarkChanged;
52 
55 
56  void operator() (pkgCache::VerIterator const &Ver);
57  bool propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > const &start, std::ostream &out);
58  void doAutoInstall();
59 };
60  /*}}}*/
61 // TryToRemove - Mark a package for removal /*{{{*/
62 struct TryToRemove {
65  bool PurgePkgs;
66 
68  PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};
69 
70  void operator() (pkgCache::VerIterator const &Ver);
71 };
72  /*}}}*/
73 
74 
75 #endif
return false
Configuration * _config
#define APT_PUBLIC
Definition: macros.h:77
pkgCache - Structure definitions for the cache file
std::vector< PseudoPkg > GetAllPackagesAsPseudo(pkgSourceList *const SL, CommandLine &CmdL, bool(*Add)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &), std::string const &pseudoArch)
APT_PUBLIC bool DoInstall(CommandLine &Cmd)
bool AddVolatileSourceFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector< PseudoPkg > &VolatileCmdL)
bool CheckNothingBroken(CacheFile &Cache)
bool DoAutomaticRemove(CacheFile &Cache)
APT_PUBLIC bool InstallPackages(CacheFile &Cache, bool ShwKept, bool Ask=true, bool Safety=true)
bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector< PseudoPkg > &VolatileCmdL, CacheFile &Cache, std::map< unsigned short, APT::VersionSet > &verset, int UpgradeMode, std::set< std::string > &UnknownPackages)
bool AddVolatileBinaryFile(pkgSourceList *const SL, PseudoPkg &&pkg, std::vector< PseudoPkg > &VolatileCmdL)
std::vector< PseudoPkg > GetPseudoPackages(pkgSourceList *const SL, CommandLine &CmdL, bool(*Add)(pkgSourceList *const, PseudoPkg &&, std::vector< PseudoPkg > &), std::string const &pseudoArch)
ssize_t index
PseudoPkg(std::string const &n, std::string const &a, std::string const &r)
PseudoPkg(std::string const &n, std::string const &a, std::string const &r, ssize_t i)
std::string name
std::string arch
std::string release
unsigned long AutoMarkChanged
pkgCacheFile * Cache
APT::PackageSet doAutoInstallLater
TryToInstall(pkgCacheFile &Cache, pkgProblemResolver *PM, bool const FixBroken)
pkgProblemResolver * Fix
void operator()(pkgCache::VerIterator const &Ver)
bool propergateReleaseCandiateSwitching(std::list< std::pair< pkgCache::VerIterator, std::string > > const &start, std::ostream &out)
pkgCacheFile * Cache
pkgProblemResolver * Fix
void operator()(pkgCache::VerIterator const &Ver)
TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM)