]> git.saurik.com Git - apt.git/blob - apt-private/private-install.h
fix testcase expecting incorrect remove log from dpkg
[apt.git] / apt-private / private-install.h
1 #ifndef APT_PRIVATE_INSTALL_H
2 #define APT_PRIVATE_INSTALL_H
3
4 #include <apt-pkg/cachefile.h>
5 #include <apt-pkg/configuration.h>
6 #include <apt-pkg/pkgcache.h>
7 #include <apt-pkg/cacheiterators.h>
8 #include <apt-pkg/cacheset.h>
9 #include <apt-pkg/macros.h>
10
11 #include <list>
12 #include <string>
13 #include <utility>
14
15 class CacheFile;
16 class CommandLine;
17 class pkgProblemResolver;
18
19 APT_PUBLIC bool DoInstall(CommandLine &Cmd);
20
21 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::string> &VolatileCmdL, CacheFile &Cache,
22 std::map<unsigned short, APT::VersionSet> &verset, int UpgradeMode);
23 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::string> &VolatileCmdL, CacheFile &Cache, int UpgradeMode);
24 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, int UpgradeMode);
25
26 APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
27 bool Safety = true);
28
29 bool CheckNothingBroken(CacheFile &Cache);
30 bool DoAutomaticRemove(CacheFile &Cache);
31
32 // TryToInstall - Mark a package for installation /*{{{*/
33 struct TryToInstall {
34 pkgCacheFile* Cache;
35 pkgProblemResolver* Fix;
36 bool FixBroken;
37 unsigned long AutoMarkChanged;
38 APT::PackageSet doAutoInstallLater;
39
40 TryToInstall(pkgCacheFile &Cache, pkgProblemResolver *PM, bool const FixBroken) : Cache(&Cache), Fix(PM),
41 FixBroken(FixBroken), AutoMarkChanged(0) {};
42
43 void operator() (pkgCache::VerIterator const &Ver);
44 bool propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > const &start, std::ostream &out);
45 void doAutoInstall();
46 };
47 /*}}}*/
48 // TryToRemove - Mark a package for removal /*{{{*/
49 struct TryToRemove {
50 pkgCacheFile* Cache;
51 pkgProblemResolver* Fix;
52 bool PurgePkgs;
53
54 TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM) : Cache(&Cache), Fix(PM),
55 PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};
56
57 void operator() (pkgCache::VerIterator const &Ver);
58 };
59 /*}}}*/
60
61
62 #endif