summaryrefslogtreecommitdiff
path: root/ftparchive/cachedb.cc
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos reported by codespell & spellintianDavid Kalnischkies2018-08-291-1/+1
| | | | | | | | No user-visible change as it effects mostly code comments and not a single error message, manpage or similar. Reported-By: codespell & spellintian Gbp-Dch: Ignore
* Remove obsolete RCS keywordsGuillem Jover2018-05-071-1/+0
| | | | Prompted-by: Jakub Wilk <jwilk@debian.org>
* Reformat and sort all includes with clang-formatJulian Andres Klode2017-07-121-7/+7
| | | | | | | | | | | | | This makes it easier to see which headers includes what. The changes were done by running git grep -l '#\s*include' \ | grep -E '.(cc|h)$' \ | xargs sed -i -E 's/(^\s*)#(\s*)include/\1#\2 include/' To modify all include lines by adding a space, and then running ./git-clang-format.sh.
* Check for cached hash entries to determine which (if any) hash typesDominic Benson2016-06-201-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.
* do not generate bogus hashes if hash is disabled in apt-ftparchiveDavid Kalnischkies2015-09-141-4/+9
|
* fix memory leaks reported by -fsanitizeDavid Kalnischkies2015-08-101-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
* calculate only expected hashes in methodsDavid Kalnischkies2015-04-191-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.
* merge debian/sid into debian/experimentalDavid Kalnischkies2015-03-161-3/+3
|\
| * 128 KiB DSC files ought to be enough for everyoneDavid Kalnischkies2015-01-101-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
* | promote filesize to a hashstringDavid Kalnischkies2014-10-241-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.
* | fix: warning: extra ‘;’ [-Wpedantic]David Kalnischkies2014-09-271-3/+3
| | | | | | | | | | Reported-By: gcc -Wpedantic Git-Dch: Ignore
* | Merge branch 'debian/sid' into debian/experimentalMichael Vogt2014-06-181-10/+72
|\| | | | | | | | | Conflicts: debian/changelog
| * Add compat mode for old (32bit FileSize) CacheDB (LP: #1274466)Michael Vogt2014-06-041-10/+59
| |
| * use free() instead of delete() when realloc is usedMichael Vogt2014-05-271-0/+13
| | | | | | | | | | | | | | ContentsExtract::~ContentsExtract() needs to use free() because Data got allocated via realloc() Reported-By: clang -fsanitize=address -fno-omit-frame-pointer
* | deal with hashes in ftparchive more dynamic as wellDavid Kalnischkies2014-05-091-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.
* fix regression from commit 215b0fafMichael Vogt2014-05-081-14/+4
|
* ensure "--db" also works with the new srcpkgdbMichael Vogt2014-04-071-1/+1
|
* refactor _InitQuery()Michael Vogt2014-04-041-8/+8
|
* ensure clean worksMichael Vogt2014-04-041-5/+14
|
* refactor to make OpenFile/OpenDebFile more robustMichael Vogt2014-04-041-120/+110
|
* add test for binary cachedb and contents generationMichael Vogt2014-04-041-0/+1
|
* Implement CacheDB for source packages in apt-ftparchiveMichael Vogt2014-04-041-45/+101
|
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-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)
* ensure that apti18n.h is included last as advertised (Closes: #671623)David Kalnischkies2012-05-051-2/+3
|
* try to avoid direct usage of .Fd() if possible and do read()s and coDavid Kalnischkies2011-12-171-4/+4
| | | | on the FileFd instead
* merge with current debian apt/experimentalDavid Kalnischkies2011-10-051-5/+9
|\
| * * apt-pkg/contrib/configuration.cc:Michael Vogt2011-10-051-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)
| | * ftparchive/cachedb.cc: rewrite to fix the fixed length fieldMichael Vogt2011-09-221-5/+9
| | |
| | * * ftparchive/cachedb.cc:Michael Vogt2011-09-221-1/+1
| | | | | | | | | - fix buffersize in bytes2hex
* | | use forward declaration in headers if possible instead of includesDavid Kalnischkies2011-09-191-0/+1
| | |
* | | do not pollute namespace in the headers with using (Closes: #500198)David Kalnischkies2011-09-191-6/+6
|/ /
* / reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-2/+4
|/
* move sha512,256 into apt-pkg/sha2.{cc,h}, move gifford implementation to ↵Michael Vogt2011-02-251-2/+1
| | | | sha2_internal.{cc,h}
* add sha512 support to apt-ftparchiveMichael Vogt2011-02-221-2/+37
|
* fix a few typos in strings, comments and manpage of apt-ftparchiveDavid Kalnischkies2009-12-011-3/+3
| | | | thanks Karl Goetz! (Closes: #558757)
* tell every method in ftparchive/ that const& is sexyDavid Kalnischkies2009-11-281-9/+9
|
* add APT::FTPArchive::AlwaysStat to disable the too aggressiveDavid Kalnischkies2009-11-281-5/+9
| | | | | caching if versions are build multiply times (not recommend) Patch by Christoph Goehre, thanks! (Closes: #463260)
* fix compiler warning: suggest parentheses around && within || in cachedbDavid Kalnischkies2009-10-141-5/+5
|
* * apt-pkg/contrib/strutl.cc:Michael Vogt2009-04-091-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).
* * remove all the remaining #pragma implementationMichael Vogt2007-06-081-4/+0
|
* * ftparchive/cachedb.cc:Michael Vogt2006-07-241-7/+6
| | | | - applied patch from ajt (#379576)
* * give a useful error message for the database changeMichael Vogt2006-04-261-0/+6
|
* * added ajs patchMichael Vogt2006-03-081-38/+212
|
* * Build apt-ftparchive with libdb4.2 rather than libdb2Arch Librarian2004-09-201-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)
* Lots and lots of i18n updates.Arch Librarian2004-09-201-7/+8
| | | | | | Author: doogie Date: 2003-02-10 07:34:41 GMT Lots and lots of i18n updates.
* Missed one st_mtime.Arch Librarian2004-09-201-2/+2
| | | | | | Author: doogie Date: 2002-11-22 18:02:08 GMT Missed one st_mtime.
* s/st_mtime/mtime/ on our local stat structure in apt-ft...Arch Librarian2004-09-201-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.
* G++3 fixes from RandolphArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 2001-05-29 03:48:27 GMT G++3 fixes from Randolph
* Join with aliencodeArch Librarian2004-09-201-0/+284
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode