]>
git.saurik.com Git - apt.git/blob - apt-private/private-upgrade.cc
2 #include <apt-pkg/algorithms.h>
4 #include "private-install.h"
5 #include "private-cachefile.h"
6 #include "private-upgrade.h"
7 #include "private-output.h"
10 // DoUpgradeNoNewPackages - Upgrade all packages /*{{{*/
11 // ---------------------------------------------------------------------
12 /* Upgrade all packages without installing new packages or erasing old
14 bool DoUpgradeNoNewPackages(CommandLine
&CmdL
)
17 if (Cache
.OpenForInstall() == false || Cache
.CheckDeps() == false)
21 if (pkgAllUpgrade(Cache
) == false)
23 ShowBroken(c1out
,Cache
,false);
24 return _error
->Error(_("Internal error, AllUpgrade broke stuff"));
27 // parse additional cmdline pkg manipulation switches
28 if(!DoCacheManipulationFromCommandLine(CmdL
, Cache
))
31 return InstallPackages(Cache
,true);
35 // DoSafeUpgrade - Upgrade all packages with install but not remove /*{{{*/
36 bool DoUpgradeWithAllowNewPackages(CommandLine
&CmdL
)
39 if (Cache
.OpenForInstall() == false || Cache
.CheckDeps() == false)
43 if (pkgAllUpgradeNoDelete(Cache
) == false)
45 ShowBroken(c1out
,Cache
,false);
46 return _error
->Error(_("Internal error, AllUpgrade broke stuff"));
49 // parse additional cmdline pkg manipulation switches
50 if(!DoCacheManipulationFromCommandLine(CmdL
, Cache
))
53 return InstallPackages(Cache
,true);