]> git.saurik.com Git - apt.git/blob - apt-private/private-install.h
implement dpkgs vision of interpreting pkg:<arch> dependencies
[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, CacheFile &Cache,
22 std::map<unsigned short, APT::VersionSet> &verset, int UpgradeMode);
23 bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, int UpgradeMode);
24
25 APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
26 bool Safety = true);
27
28
29 // TryToInstall - Mark a package for installation /*{{{*/
30 struct APT_PUBLIC TryToInstall {
31 pkgCacheFile* Cache;
32 pkgProblemResolver* Fix;
33 bool FixBroken;
34 unsigned long AutoMarkChanged;
35 APT::PackageSet doAutoInstallLater;
36
37 TryToInstall(pkgCacheFile &Cache, pkgProblemResolver *PM, bool const FixBroken) : Cache(&Cache), Fix(PM),
38 FixBroken(FixBroken), AutoMarkChanged(0) {};
39
40 void operator() (pkgCache::VerIterator const &Ver);
41 bool propergateReleaseCandiateSwitching(std::list<std::pair<pkgCache::VerIterator, std::string> > const &start, std::ostream &out);
42 void doAutoInstall();
43 };
44 /*}}}*/
45 // TryToRemove - Mark a package for removal /*{{{*/
46 struct APT_PUBLIC TryToRemove {
47 pkgCacheFile* Cache;
48 pkgProblemResolver* Fix;
49 bool PurgePkgs;
50
51 TryToRemove(pkgCacheFile &Cache, pkgProblemResolver *PM) : Cache(&Cache), Fix(PM),
52 PurgePkgs(_config->FindB("APT::Get::Purge", false)) {};
53
54 void operator() (pkgCache::VerIterator const &Ver);
55 };
56 /*}}}*/
57
58
59 #endif