summaryrefslogtreecommitdiff
path: root/methods/rred.cc
Commit message (Collapse)AuthorAgeFilesLines
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-3/+2
| | | | | | | | 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)
* fix -Wformat= warnings about size_t != %lu on e.g. armelDavid Kalnischkies2014-03-131-6/+6
| | | | | Git-Dch: Ignore Reported-By: gcc
* use utimes instead of utimensat/futimensDavid Kalnischkies2014-02-111-4/+5
| | | | | | | | | | | cppcheck complains about the obsolete utime as it was removed in POSIX1.2008 and recommends usage of utimensat/futimens instead as those are in POSIX and so commit 9ce3cfc9 switched to them. It is just that they aren't as portable as the standard suggests: At least our kFreeBSD and Hurd ports stumble over it at runtime. So to make both, the ports and cppcheck happy, we use utimes instead. Closes: 738567
* fix various style/performance warnings in rredDavid Kalnischkies2014-01-301-43/+24
| | | | | Reported-By: cppcheck Git-Dch: Ignore
* methods/rred: minor robustness improvementsAnthony Towns2014-01-211-19/+20
| | | | | Use retry_fwrite to better handle partial fwrite successes, and to keep the Hashes in sync with what's actually written.
* integrate Anthonys rred with POC for client-side mergeDavid Kalnischkies2014-01-151-68/+26
| | | | | | | | | | | | | Providing the benefits of both without the downsides :) (ABI breaks or external dependencies) For this Anthonys rred is equipped with: - magic-filename-pickup of patches rather than explicit messages - use of FileFd instead of FILE* to get on-the-fly uncompress of the gzip compressed pdiff patches The acquire code in turn stops checking for apt-file's helper as our own rred is now clever enough for our needs.
* reimplement rred to allow applying all the diffs in a single passAnthony Towns2014-01-151-600/+684
| | | | | | | | | | | | | | | Based on the idea presented in: https://lists.debian.org/deity/2009/08/msg00169.html and https://lists.debian.org/debian-devel/2014/01/msg00081.html It reads all patches one by one and merges them in-memory before applying the merged changes to the index. Beware: This commit by David Kalnischkies rips out the rred binary rewrite unchanged (expect minor format issue corrections) from the proposed changes, so this commit alone BREAKS pdiff completely. The integration into the acquire system as it was prepared in the previous POC will be done in the next commit to have proper 'blame'.
* implement POC client-side merging of pdiffs via apt-fileDavid Kalnischkies2013-12-131-32/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea of pdiffs is to avoid downloading the hole file by patching the existing index. This works very well, but becomes slow if a lot of patches needs to be applied to reconstruct an up-to-date index and in recent years more and more dinstall (or similar) runs are executed creating more and more pdiffs in the same amount of time, so pdiffs became less useful. The solution is simple: Reduce the amount of patches (which are very small) which need to be applied on top of the index we have available (which is usually pretty big). This can be done in two ways: Either merge the patches on the server-side so that the client has to download only one patch or the patches are all downloaded and merged on the client-side. The first needs a client who is doing one step at a time who can also skip patches if it needs (APT supports this for a long time now). The later is implemented by this commit, but depends on the server NOT merging the patches and the patches being in a strict order in which no patch is skipped. This is traditionally the case for dak, but other repository creators support merging – e.g. reprepro (which helpfully adds a flag indicating that the patches are merged). To support both or even mixes a client needs more information which isn't available for now. This POC uses the external diffindex-rred included in apt-file to do the heavy lifting of merging & applying all patches in one pass, hence to test this feature apt-file needs to be installed.
* we don't need zlib (anymore) in rred so don't include itDavid Kalnischkies2012-05-101-1/+0
|
* make these retry_write methods static so that they don't end up as symbolsDavid Kalnischkies2012-03-221-1/+1
|
* * methods/rred.cc:David Kalnischkies2012-03-201-5/+20
| | | | | | | | | | | - check return of writev() as gcc recommends * methods/mirror.cc: - check return of chdir() as gcc recommends * apt-pkg/deb/dpkgpm.cc: - check return of write() a gcc recommends * apt-inst/deb/debfile.cc: - check return of chdir() as gcc recommends * apt-inst/deb/dpkgdb.cc: - check return of chdir() as gcc recommends
* fix a few esoteric cppcheck errors/warnings/infosDavid Kalnischkies2012-01-201-1/+6
|
* as Size() can be quiet expensive for compressed files lets store the resultDavid Kalnischkies2012-01-101-3/+5
|
* implement the fallback method of rred by using the FileFd and the includedDavid Kalnischkies2011-12-181-37/+12
| | | | ReadLine instead of accessing the files directly with fgets()
* - add a ReadLine methodDavid Kalnischkies2011-12-111-28/+14
| | | - drop the explicit export of gz-compression handling
* enable FileFd to guess the compressor based on the filename if requested orDavid Kalnischkies2011-12-101-1/+1
| | | | | to search for compressed silbings of the given filename and use this guessing instead of hardcoding Gzip compression
* 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-2/+2
|
* merge with debian/experimentalDavid Kalnischkies2011-09-131-2/+5
|\
| * follow the recommendation of cppcheck to make some method methods (scnr)David Kalnischkies2011-08-111-2/+5
| | | | | | | | const and initial mostly Debug member values in the constructors
* | Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-1/+1
| | | | | | | | size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
* | reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies2011-09-131-0/+2
|/
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2011-02-141-1/+1
| | | | | | | - really detect bigendian machines by including config.h, so we can really (Closes: #612986) * apt-pkg/contrib/mmap.cc: - Base has as 'valid' failure states 0 and -1 so add a simple validData method to check for failure states
* update size of dynamic MMap as we write in from the outsideDavid Kalnischkies2011-02-131-3/+8
|
* * methods/rred.cc:David Kalnischkies2011-02-121-2/+4
| | | - read patch into MMap only if we work on uncompressed patches
* * methods/rred.cc:David Kalnischkies2011-01-151-9/+40
| | | | | - operate optional on gzip compressed pdiffs * apt-pkg/acquire-item.cc: - don't uncompress downloaded pdiff files before feeding it to rred
* apt-pkg, methods: Convert users of WriteEmpty to WriteAtomic.Julian Andres Klode2010-08-101-2/+2
|
* * methods/rred.cc:David Kalnischkies2010-05-041-8/+11
| | | | - use the patchfile modification time instead of the one from the "old" file - thanks to Philipp Weis for noticing! (Closes: #571541)
* Backport rred patches from my own sid branch to the 0.7.25 branchDavid Kalnischkies2009-12-111-184/+464
| | | | | | | | | | * rewrite and refactor rred method to be able to handle even big (>30 MB) patches (Closes: #554349) and hardening the method itself by using more constants and a return value which can't be misinterpreted as linenumber * Finally adope the patch from Morten Hustveit <morten@debian.org> to be able to optional use mmaps and iovec to increase patch speed - but as this increase memory usage we can always fall back to the "old" method which doesn't depend on mmaps.
* add text at the top without failing in rred (Closes: #545694)David Kalnischkies2009-09-081-1/+1
| | | | Patch from Bernhard R. Link, thanks!
* * debug support (Debug::pkgAcquire::RRed) for rred method addedMichael Vogt2005-08-291-0/+16
|
* * method/rred.cc cleanup (thanks to robertle)Michael Vogt2005-08-231-143/+149
|
* * bugfix/updates in the rred.cc code (big thanks for helping Robert!)Michael Vogt2005-08-221-9/+35
|
* * rred.cc: use the d'tor of FileFd to close the file-fd; acquuire-item.cc: ↵Michael Vogt2005-08-221-9/+2
| | | | make the QueueNextDiff() code more robust
* * use the new cool rred method for the patchtingMichael Vogt2005-08-191-1/+1
|
* * added methods/rred.cc (thanks to robertle)Michael Vogt2005-07-281-0/+221