// ConfigToDoHashes - which hashes to generate /*{{{*/
static void SingleConfigToDoHashes(unsigned int &DoHashes, std::string const &Conf, unsigned int const Flag)
{
- if (_config->FindB(Conf, true) == true)
+ if (_config->FindB(Conf, (DoHashes & Flag) == Flag) == true)
DoHashes |= Flag;
else
DoHashes &= ~Flag;
Fields["Architectures"] = "";
Fields["Components"] = "";
Fields["Description"] = "";
- if (_config->FindB("APT::FTPArchive::DoByHash", true) == true)
+ if (_config->FindB("APT::FTPArchive::DoByHash", false) == true)
Fields["Acquire-By-Hash"] = "true";
for(map<string,string>::const_iterator I = Fields.begin();
// FIXME: wrong layer in the code(?)
// FIXME2: symlink instead of create a copy
- if (_config->FindB("APT::FTPArchive::DoByHash", true) == true)
+ if (_config->FindB("APT::FTPArchive::DoByHash", false) == true)
{
std::string Input = FileName;
HashStringList hsl = hs.GetHashStringList();
{
if (!h->usable())
continue;
- std::string ByHashOutputFile = GenByHashFilename(Input, *h);
+ if (flNotDir(FileName) == "Release" || flNotDir(FileName) == "InRelease")
+ continue;
+ std::string ByHashOutputFile = GenByHashFilename(Input, *h);
std::string ByHashOutputDir = flNotFile(ByHashOutputFile);
if(!CreateDirectory(flNotFile(Input), ByHashOutputDir))
return _error->Warning("can not create dir %s", flNotFile(ByHashOutputFile).c_str());
// go by-hash cleanup
map<string,ReleaseWriter::CheckSum>::const_iterator prev = CheckSums.begin();
- if (_config->FindB("APT::FTPArchive::DoByHash", true) == true)
+ if (_config->FindB("APT::FTPArchive::DoByHash", false) == true)
{
for(map<string,ReleaseWriter::CheckSum>::const_iterator I = CheckSums.begin();
I != CheckSums.end(); ++I)