summaryrefslogtreecommitdiff
path: root/apt-pkg/acquire-worker.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2014-02-14 00:30:58 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2014-02-14 12:06:28 +0100
commit9082a1fc7be02f58cbe18a34539c6a3436463dd0 (patch)
treee8cd4ceb678ef43e7be031c835f6ee7866052e8b /apt-pkg/acquire-worker.cc
parentf9b4f12d65b827612b29071f05d605bc05fa62bd (diff)
allow http protocol to switch to https
switch protocols at random is a bad idea if e.g. http can switch to file, so we limit the possibilities to http to http and http to https. As very few people (less than 1% according to popcon) have https installed this likely changes nothing in terms of failure. The commit is adding a friendly hint which package needs to be installed though.
Diffstat (limited to 'apt-pkg/acquire-worker.cc')
-rw-r--r--apt-pkg/acquire-worker.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/apt-pkg/acquire-worker.cc b/apt-pkg/acquire-worker.cc
index 44a84216a..44c3e4e17 100644
--- a/apt-pkg/acquire-worker.cc
+++ b/apt-pkg/acquire-worker.cc
@@ -109,7 +109,12 @@ bool pkgAcquire::Worker::Start()
// Get the method path
string Method = _config->FindDir("Dir::Bin::Methods") + Access;
if (FileExists(Method) == false)
- return _error->Error(_("The method driver %s could not be found."),Method.c_str());
+ {
+ _error->Error(_("The method driver %s could not be found."),Method.c_str());
+ if (Access == "https")
+ _error->Notice(_("Is the package %s installed?"), "apt-transport-https");
+ return false;
+ }
if (Debug == true)
clog << "Starting method '" << Method << '\'' << endl;