]> git.saurik.com Git - apt.git/blame - apt-private/private-install.h
Accept --autoremove as alias for --auto-remove
[apt.git] / apt-private / private-install.h
CommitLineData
b9179170
MV
1#ifndef APT_PRIVATE_INSTALL_H
2#define APT_PRIVATE_INSTALL_H
3
453b82a3
DK
4#include <apt-pkg/cachefile.h>
5#include <apt-pkg/configuration.h>
453b82a3
DK
6#include <apt-pkg/pkgcache.h>
7#include <apt-pkg/cacheiterators.h>
b9179170 8#include <apt-pkg/cacheset.h>
63ff4208
DK
9#include <apt-pkg/macros.h>
10
453b82a3 11#include <list>
453b82a3
DK
12#include <string>
13#include <utility>
b9179170 14
453b82a3
DK
15class CacheFile;
16class CommandLine;
4d695011 17class pkgProblemResolver;
453b82a3 18
63ff4208 19APT_PUBLIC bool DoInstall(CommandLine &Cmd);
b9179170 20
92296fe4 21bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::string> &VolatileCmdL, CacheFile &Cache,
172947cd 22 std::map<unsigned short, APT::VersionSet> &verset, int UpgradeMode);
92296fe4 23bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::string> &VolatileCmdL, CacheFile &Cache, int UpgradeMode);
172947cd 24bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, CacheFile &Cache, int UpgradeMode);
b9179170 25
63ff4208 26APT_PUBLIC bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
b9179170
MV
27 bool Safety = true);
28
a249b3e6
DK
29bool CheckNothingBroken(CacheFile &Cache);
30bool DoAutomaticRemove(CacheFile &Cache);
b9179170
MV
31
32// TryToInstall - Mark a package for installation /*{{{*/
f6777222 33struct TryToInstall {
b9179170
MV
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
4d695011
DK
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();
b9179170
MV
46};
47 /*}}}*/
48// TryToRemove - Mark a package for removal /*{{{*/
f6777222 49struct TryToRemove {
b9179170
MV
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
4d695011 57 void operator() (pkgCache::VerIterator const &Ver);
b9179170
MV
58};
59 /*}}}*/
60
61
62#endif