summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2017-01-19 02:53:35 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2017-01-19 03:06:00 +0100
commit3313eaf97c83177433478505c05815ab02f9782b (patch)
tree313ed94993b6eb6911f42bc3acaaed02e6bae5ce /apt-private
parent06606f073210fe3902fe92d5ff77fa1ab621b972 (diff)
fix 'install --no-download' mode
The mode wasn't working at all if not used together with --fix-missing which while likely to come in pairs its legal to use standalone. Regression-in: eb1f04dda07c2b69549ad9fd793cca0e91841b3e
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-install.cc13
1 files changed, 8 insertions, 5 deletions
diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc
index b49c7f2ef..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;
}