summaryrefslogtreecommitdiff
path: root/apt-private/private-install.cc
diff options
context:
space:
mode:
Diffstat (limited to 'apt-private/private-install.cc')
-rw-r--r--apt-private/private-install.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index 761e4d175..73a03a828 100644
--- a/apt-private/private-install.cc
+++ b/apt-private/private-install.cc
@@ -136,16 +136,19 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
_error->PendingError() == true)
return false;
- if (_config->FindB("APT::Get::Fix-Missing",false) == true &&
- _config->FindB("APT::Get::Download",true) == false)
+ if (_config->FindB("APT::Get::Download",true) == false)
{
bool Missing = false;
RemoveDownloadNeedingItemsFromFetcher(Fetcher, Missing);
if (Missing)
- PM->FixMissing();
+ {
+ if (_config->FindB("APT::Get::Fix-Missing",false))
+ PM->FixMissing();
+ else
+ return _error->Error(_("Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?"));
+ }
Fetcher.Shutdown();
- if (PM->GetArchives(&Fetcher,List,&Recs) == false ||
- _error->PendingError() == true)
+ if (_error->PendingError() == true)
return false;
}
@@ -396,7 +399,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety)
/* Remove unused automatic packages */
bool DoAutomaticRemove(CacheFile &Cache)
{
- bool Debug = _config->FindI("Debug::pkgAutoRemove",false);
+ bool Debug = _config->FindB("Debug::pkgAutoRemove",false);
bool doAutoRemove = _config->FindB("APT::Get::AutomaticRemove", false);
bool hideAutoRemove = _config->FindB("APT::Get::HideAutoRemove");
@@ -657,9 +660,9 @@ bool DoCacheManipulationFromCommandLine(CommandLine &CmdL, std::vector<std::stri
packages */
if (BrokenFix == true && Cache->BrokenCount() != 0)
{
- c1out << _("You might want to run 'apt-get -f install' to correct these:") << std::endl;
+ c1out << _("You might want to run 'apt --fix-broken install' to correct these.") << std::endl;
ShowBroken(c1out,Cache,false);
- return _error->Error(_("Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)."));
+ return _error->Error(_("Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution)."));
}
if (Fix != NULL)