summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorMichael Vogt <mvo@ubuntu.com>2014-09-17 14:11:50 +0200
committerMichael Vogt <mvo@ubuntu.com>2014-09-17 14:11:50 +0200
commit33cb8ac173733b716cbaec5ae0e7296cd75bca8d (patch)
treedff46d3395ce0e00af390ee5a88ead5c2dc6cfbf /cmdline
parent7567b2abe424451e01d6e55c3fd14d37a4c150bf (diff)
merge 0.9.7.9+deb7u3
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-get.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 112b7ca3f..ee10a5301 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -2373,6 +2373,7 @@ bool DoDownload(CommandLine &CmdL)
pkgSourceList *SrcList = Cache.GetSourceList();
bool gotAll = true;
+ std::string UntrustedList;
for (APT::VersionList::const_iterator Ver = verset.begin();
Ver != verset.end();
++Ver)
@@ -2396,6 +2397,8 @@ bool DoDownload(CommandLine &CmdL)
gotAll = false;
continue;
}
+ if (index->IsTrusted() == false)
+ UntrustedList += Pkg.Name() + string(" ");
string uri = index->ArchiveURI(rec.FileName());
strprintf(descr, _("Downloading %s %s"), Pkg.Name(), Ver.VerStr());
// get the most appropriate hash
@@ -2424,6 +2427,9 @@ bool DoDownload(CommandLine &CmdL)
return true;
}
+ if (UntrustedList != "" && !AuthPrompt(UntrustedList, false))
+ return false;
+
return (Fetcher.Run() == pkgAcquire::Continue);
}
/*}}}*/