summaryrefslogtreecommitdiff
path: root/ftparchive/cachedb.cc
AgeCommit message (Collapse)AuthorFilesLines
2016-06-20Check for cached hash entries to determine which (if any) hash typesDominic Benson1-1/+18
need to be generated for the current file. In 1.0.9, each hash type was handled by a separate method, each of which checked the cache. It looks like when these code paths were unified (in a311fb96b84757ef8628e6a754232614a53b7891) the cache checks were not incorporated into the new method.
2015-09-14do not generate bogus hashes if hash is disabled in apt-ftparchiveDavid Kalnischkies1-4/+9
2015-08-10fix memory leaks reported by -fsanitizeDavid Kalnischkies1-0/+1
Various small leaks here and there. Nothing particularily big, but still good to fix. Found by the sanitizers while running our testcases. Reported-By: gcc -fsanitize Git-Dch: Ignore
2015-04-19calculate only expected hashes in methodsDavid Kalnischkies1-2/+2
Methods get told which hashes are expected by the acquire system, which means we can use this list to restrict what we calculate in the methods as any extra we are calculating is wasted effort as we can't compare it with anything anyway. Adding support for a new hash algorithm is therefore 'free' now and if a algorithm is no longer provided in a repository for a file, we automatically stop calculating it. In practice this results in a speed-up in Debian as we don't have SHA512 here (so far), so we practically stop calculating it.
2015-03-16merge debian/sid into debian/experimentalDavid Kalnischkies1-3/+3
2015-01-10128 KiB DSC files ought to be enough for everyoneDavid Kalnischkies1-3/+3
Your mileage may vary, but don't worry: There is more than one way to do it, but our one size fits all is not a bigger hammer, but an entire roundhouse kick! So brace yourself for the tl;dr: The limit is gone.* Beware: This fixes also the problem that a double newline is unconditionally added 'later' which is an overcommitment in case the dsc filesize is limit-2 <= x <= limit. * limited to numbers fitting into an unsigned long long. Closes: 774893
2014-10-24promote filesize to a hashstringDavid Kalnischkies1-0/+4
It is a very simple hashstring, which is why it isn't contributing to the usability of a list of them, but it is also trivial to check and calculate, so it doesn't hurt checking it either as it can combined even with the simplest other hashes greatly complicate attacks on them as you suddenly need a same-size hash collision, which is usually a lot harder to achieve.
2014-09-27fix: warning: extra ‘;’ [-Wpedantic]David Kalnischkies1-3/+3
Reported-By: gcc -Wpedantic Git-Dch: Ignore
2014-06-18Merge branch 'debian/sid' into debian/experimentalMichael Vogt1-10/+72
Conflicts: debian/changelog
2014-06-04Add compat mode for old (32bit FileSize) CacheDB (LP: #1274466)Michael Vogt1-10/+59
2014-05-27use free() instead of delete() when realloc is usedMichael Vogt1-0/+13
ContentsExtract::~ContentsExtract() needs to use free() because Data got allocated via realloc() Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
2014-05-09deal with hashes in ftparchive more dynamic as wellDavid Kalnischkies1-133/+61
Now that libapts acquire system happily passes around hashes and can be made to support new ones without an ABI break in the future, we can free ftparchive from all the deprecation warnings the last commit introduced for it. The goal here isn't to preserve ABI as we have none to keep here, but to help avoiding introduction problems of 'new' hashes later as bugs creep into the copy&paste parts, so short/less of them is good.
2014-05-08fix regression from commit 215b0fafMichael Vogt1-14/+4
2014-04-07ensure "--db" also works with the new srcpkgdbMichael Vogt1-1/+1
2014-04-04refactor _InitQuery()Michael Vogt1-8/+8
2014-04-04ensure clean worksMichael Vogt1-5/+14
2014-04-04refactor to make OpenFile/OpenDebFile more robustMichael Vogt1-120/+110
2014-04-04add test for binary cachedb and contents generationMichael Vogt1-0/+1
2014-04-04Implement CacheDB for source packages in apt-ftparchiveMichael Vogt1-45/+101
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies1-0/+4
Beside being a bit cleaner it hopefully also resolves oddball problems I have with high levels of parallel jobs. Git-Dch: Ignore Reported-By: iwyu (include-what-you-use)
2012-05-05ensure that apti18n.h is included last as advertised (Closes: #671623)David Kalnischkies1-2/+3
2011-12-17try to avoid direct usage of .Fd() if possible and do read()s and coDavid Kalnischkies1-4/+4
on the FileFd instead
2011-10-05merge with current debian apt/experimentalDavid Kalnischkies1-5/+9
2011-10-05* apt-pkg/contrib/configuration.cc:Michael Vogt1-5/+9
- fix double delete (LP: #848907) - ignore only the invalid regexp instead of all options * apt-pkg/acquire-item.h, apt-pkg/deb/debmetaindex.cc: - fix fetching language information by adding OptionalSubIndexTarget * methods/https.cc: - cleanup broken downloads properly * ftparchive/cachedb.cc: - fix buffersize in bytes2hex * apt-pkg/deb/deblistparser.cc: - fix crash when the dynamic mmap needs to be grown in LoadReleaseInfo (LP: #854090)
2011-09-22ftparchive/cachedb.cc: rewrite to fix the fixed length fieldMichael Vogt1-5/+9
2011-09-22* ftparchive/cachedb.cc:Michael Vogt1-1/+1
- fix buffersize in bytes2hex
2011-09-19use forward declaration in headers if possible instead of includesDavid Kalnischkies1-0/+1
2011-09-19do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies1-6/+6
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies1-2/+4
2011-02-25move sha512,256 into apt-pkg/sha2.{cc,h}, move gifford implementation to ↵Michael Vogt1-2/+1
sha2_internal.{cc,h}
2011-02-22add sha512 support to apt-ftparchiveMichael Vogt1-2/+37
2009-12-01fix a few typos in strings, comments and manpage of apt-ftparchiveDavid Kalnischkies1-3/+3
thanks Karl Goetz! (Closes: #558757)
2009-11-28tell every method in ftparchive/ that const& is sexyDavid Kalnischkies1-9/+9
2009-11-28add APT::FTPArchive::AlwaysStat to disable the too aggressiveDavid Kalnischkies1-5/+9
caching if versions are build multiply times (not recommend) Patch by Christoph Goehre, thanks! (Closes: #463260)
2009-10-14fix compiler warning: suggest parentheses around && within || in cachedbDavid Kalnischkies1-5/+5
2009-04-09* apt-pkg/contrib/strutl.cc:Michael Vogt1-0/+1
- fix TimeToStr i18n (LP: #289807) * [ABI break] merge support for http redirects, thanks to Jeff Licquia and Anthony Towns * [ABI break] use int for the package IDs (thanks to Steve Cotton) * apt-pkg/pkgcache.cc: - do not run "dpkg --configure pkg" if pkg is in trigger-awaited state (LP: #322955) * methods/https.cc: - add Acquire::https::AllowRedirect support * Clarify the --help for 'purge' (LP: #243948) * cmdline/apt-get.cc - fix "apt-get source pkg" if there is a binary package and a source package of the same name but from different packages (LP: #330103) * cmdline/acqprogress.cc: - Call pkgAcquireStatus::Pulse even if quiet, so that we still get dlstatus messages on the status-fd (LP: #290234).
2007-06-08* remove all the remaining #pragma implementationMichael Vogt1-4/+0
2006-07-24* ftparchive/cachedb.cc:Michael Vogt1-7/+6
- applied patch from ajt (#379576)
2006-04-26* give a useful error message for the database changeMichael Vogt1-0/+6
2006-03-08* added ajs patchMichael Vogt1-38/+212
2004-09-20* Build apt-ftparchive with libdb4.2 rather than libdb2Arch Librarian1-13/+22
Author: mdz Date: 2004-05-08 19:41:01 GMT * Build apt-ftparchive with libdb4.2 rather than libdb2 - Patch from Clint Adams to do most of the work - Build-Depends: s/libdb2-dev/libdb4.2-dev/ - Add AC_PREREQ(2.50) to configure.in - Use db_strerror(err) rather than GlobalError::Errno (which uses strerror)
2004-09-20Lots and lots of i18n updates.Arch Librarian1-7/+8
Author: doogie Date: 2003-02-10 07:34:41 GMT Lots and lots of i18n updates.
2004-09-20Missed one st_mtime.Arch Librarian1-2/+2
Author: doogie Date: 2002-11-22 18:02:08 GMT Missed one st_mtime.
2004-09-20s/st_mtime/mtime/ on our local stat structure in apt-ft...Arch Librarian1-5/+5
Author: doogie Date: 2002-11-22 07:19:51 GMT s/st_mtime/mtime/ on our local stat structure in apt-ftparchive, to support compliation on platforms where st_mtime is a macro.
2004-09-20G++3 fixes from RandolphArch Librarian1-2/+2
Author: jgg Date: 2001-05-29 03:48:27 GMT G++3 fixes from Randolph
2004-09-20Join with aliencodeArch Librarian1-0/+284
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode