This can happen e.g. for file: repositories. There is no inherent
problem with setting such values internally, but its bad style,
forbidden in the manpage and could be annoying in the future.
Gbp-Dch: Ignore
UseByHash = _config->Find("Acquire::By-Hash", UseByHash);
{
std::string const host = ::URI(URI).Host;
- UseByHash = _config->Find("APT::Acquire::" + host + "::By-Hash", UseByHash);
- UseByHash = _config->Find("Acquire::" + host + "::By-Hash", UseByHash);
+ if (host.empty() == false)
+ {
+ UseByHash = _config->Find("APT::Acquire::" + host + "::By-Hash", UseByHash);
+ UseByHash = _config->Find("Acquire::" + host + "::By-Hash", UseByHash);
+ }
std::map<std::string, std::string>::const_iterator const opt = Options.find("by-hash");
if (opt != Options.end())
UseByHash = opt->second;