diff options
author | Michael Vogt <mvo@ubuntu.com> | 2015-09-07 12:47:30 +0200 |
---|---|---|
committer | Michael Vogt <mvo@ubuntu.com> | 2015-09-07 16:00:55 +0200 |
commit | e8e52cd039b4c71913e157d7855500ba98e7cade (patch) | |
tree | 33828cb5040f53750236632a7d1eed8cd537b8be | |
parent | 2861bd9a2687dbd744997fddcfe90475be525bf0 (diff) |
Set APT::FTPArchive::DoByHash to false by default
"apt-ftparchive release" will create the by-hash files if
this mode is enabled. This maybe unexpected by existing users
so make it a opt-in.
Git-Dch: ignore
-rw-r--r-- | ftparchive/writer.cc | 6 | ||||
-rwxr-xr-x | test/integration/test-apt-ftparchive-by-hash | 3 |
2 files changed, 6 insertions, 3 deletions
diff --git a/ftparchive/writer.cc b/ftparchive/writer.cc index eff68f07e..11ba3a323 100644 --- a/ftparchive/writer.cc +++ b/ftparchive/writer.cc @@ -1020,7 +1020,7 @@ ReleaseWriter::ReleaseWriter(FileFd * const GivenOutput, string const &/*DB*/) : 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(); @@ -1076,7 +1076,7 @@ bool ReleaseWriter::DoPackage(string FileName) // 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(); @@ -1141,7 +1141,7 @@ void ReleaseWriter::Finish() // 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) diff --git a/test/integration/test-apt-ftparchive-by-hash b/test/integration/test-apt-ftparchive-by-hash index 6cda0e415..f00e2a24c 100755 --- a/test/integration/test-apt-ftparchive-by-hash +++ b/test/integration/test-apt-ftparchive-by-hash @@ -19,6 +19,9 @@ setupenvironment configarchitecture 'i386' configcompression 'gz' '.' +# enable by-hash in apt-ftparchive +echo 'APT::FTPArchive::DoByHash "1";' >> aptconfig.conf + # build one pacakge buildsimplenativepackage 'foo' 'i386' '1' 'unstable' buildaptarchivefromincoming |