]> git.saurik.com Git - apt.git/blame - apt-private/private-upgrade.cc
rename "--dpkg-progress" to "--show-progress" and document it in apt-get.8
[apt.git] / apt-private / private-upgrade.cc
CommitLineData
b9179170
MV
1
2#include <apt-pkg/algorithms.h>
3
4#include "private-install.h"
5#include "private-cachefile.h"
6#include "private-upgrade.h"
7#include "private-output.h"
8
9
10// DoUpgradeNoNewPackages - Upgrade all packages /*{{{*/
11// ---------------------------------------------------------------------
12/* Upgrade all packages without installing new packages or erasing old
13 packages */
14bool DoUpgradeNoNewPackages(CommandLine &CmdL)
15{
16 CacheFile Cache;
17 if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
18 return false;
19
20 // Do the upgrade
21 if (pkgAllUpgrade(Cache) == false)
22 {
23 ShowBroken(c1out,Cache,false);
24 return _error->Error(_("Internal error, AllUpgrade broke stuff"));
25 }
d8a8f9d7
MV
26
27 // parse additional cmdline pkg manipulation switches
28 if(!DoCacheManipulationFromCommandLine(CmdL, Cache))
29 return false;
b9179170
MV
30
31 return InstallPackages(Cache,true);
32}
33 /*}}}*/
34
35// DoSafeUpgrade - Upgrade all packages with install but not remove /*{{{*/
36bool DoUpgradeWithAllowNewPackages(CommandLine &CmdL)
37{
38 CacheFile Cache;
39 if (Cache.OpenForInstall() == false || Cache.CheckDeps() == false)
40 return false;
41
42 // Do the upgrade
43 if (pkgAllUpgradeNoDelete(Cache) == false)
44 {
45 ShowBroken(c1out,Cache,false);
46 return _error->Error(_("Internal error, AllUpgrade broke stuff"));
47 }
d8a8f9d7
MV
48
49 // parse additional cmdline pkg manipulation switches
50 if(!DoCacheManipulationFromCommandLine(CmdL, Cache))
51 return false;
b9179170
MV
52
53 return InstallPackages(Cache,true);
54}
55 /*}}}*/