summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2016-08-17 21:53:05 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2016-08-17 21:53:05 +0200
commitd1bdb73a96d01896ec8e213a0f14abc38d19a929 (patch)
tree78f7cf7d9cd0ecf96a504ae995290a6ba994c320 /methods
parent1485040e1b6b0b7ef706bf9552698e4c8e82051f (diff)
downloadapt-d1bdb73a96d01896ec8e213a0f14abc38d19a929.tar.gz
methods: read config in most to least specific order
The implementation of the generic config fallback did the fallback in the wrong order so that the least specific option wasn't the last value picked but in fact the first oneā€¦ doh! So in the bugreports case http -> https -> http::<hostname> -> https::<hostname> while it should have been the reverse as before. Regression-In: 30060442025824c491f58887ca7369f3c572fa57 Closes: 834642
Diffstat (limited to 'methods')
-rw-r--r--methods/aptmethod.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/methods/aptmethod.h b/methods/aptmethod.h
index 38f451708..04c4fa99b 100644
--- a/methods/aptmethod.h
+++ b/methods/aptmethod.h
@@ -86,10 +86,10 @@ public:
}
std::string ConfigFind(char const * const postfix, std::string const &defValue) const APT_NONNULL(2)
{
- for (auto && name: methodNames)
+ for (auto name = methodNames.rbegin(); name != methodNames.rend(); ++name)
{
std::string conf;
- strprintf(conf, "Acquire::%s::%s", name.c_str(), postfix);
+ strprintf(conf, "Acquire::%s::%s", name->c_str(), postfix);
auto const value = _config->Find(conf);
if (value.empty() == false)
return value;