summaryrefslogtreecommitdiff
path: root/ftparchive/multicompress.cc
Commit message (Collapse)AuthorAgeFilesLines
* Refactor finding compressor by name to avoid code dupDavid Kalnischkies2017-06-261-46/+33
| | | | Git-Dch: Ignore
* wrap every unlink call to check for != /dev/nullDavid Kalnischkies2015-11-041-3/+1
| | | | | | | | | | | | | | | | Unlinking /dev/null is bad, we shouldn't do that. Also, we should print at least a warning if we tried to unlink a file but didn't manage to pull it of (ignoring the case were the file is /dev/null or doesn't exist in the first place). This got triggered by a relatively unlikely to cause problem in pkgAcquire::Worker::PrepareFiles which would while temporary uncompressed files (which are set to keep compressed) figure out that to files are the same and prepare for sharing by deleting them. Bad move. That also shows why not printing a warning is a bad idea as this hide the error for in non-root test runs. Git-Dch: Ignore
* rewrite all TFRewrite instances to use the new pkgTagSection::WriteDavid Kalnischkies2015-05-111-11/+8
| | | | | | | | | While it is mostly busywork to rewrite all instances it actually fixes bugs as the data storage used by the new method is std::string rather than a char*, the later mostly created by c_str() from a std::string which the caller has to ensure keeps in scope – something apt-ftparchive actually didn't ensure and relied on copy-on-write behavior instead which c++11 forbids and hence the new default gcc abi doesn't use it.
* cleanup headers and especially #includes everywhereDavid Kalnischkies2014-03-131-2/+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)
* use utimes instead of utimensat/futimensDavid Kalnischkies2014-02-111-1/+2
| | | | | | | | | | | 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
* multicompress with externals sets wrong file modesColin Watson2014-02-061-1/+1
| | | | | | | | | | | | | | Copy from the bug description: After we upgraded the Ubuntu master archive from lucid to precise, we noticed that Translation-en.bz2 was being written with mode 0600 rather than 0644, which broke our mirroring. This is no longer reproducible as such in unstable because apt now links against libbz2, but it's still reproducible with xz; it happens because multicompress fchmods one end of the compression pipe in this case rather than the target file. [Original testcase slightly modified to comply with house-style] Closes: 737130
* correct some style/performance/warnings from cppcheckDavid Kalnischkies2014-01-161-6/+4
| | | | | | | | The most "visible" change is from utime to utimensat/futimens as the first one isn't part of POSIX anymore. Reported-By: cppcheck Git-Dch: Ignore
* remove the second usage instance of ExecCompressor in ftparchiveDavid Kalnischkies2011-12-141-33/+9
| | | | by again using the FileFd directly
* use FileFd instead of forking the compression childs by handDavid Kalnischkies2011-12-141-27/+3
|
* Allow the FileFd to use an external Compressor to uncompress a given fileDavid Kalnischkies2011-12-131-70/+4
| | | | | | | | | | | internally so that it is exported and can be used like a "normal" uncompressed file with FileFd This allows us to hide th zlib usage in the implementation and use gzip instead if we don't have zlib builtin (the same for other compressors). The code includes quiet a few FIXME's so while all tests are working it shouldn't be used just yet outside of libapt as it might break.
* merge with debian/experimentalDavid Kalnischkies2011-09-131-4/+4
|\
| * cppcheck complains about some possible speed improvements which could beDavid Kalnischkies2011-08-111-4/+4
| | | | | | | | | | | | done on the mirco-optimazation level, so lets fix them: (performance) Possible inefficient checking for emptiness. (performance) Prefer prefix ++/-- operators for non-primitive types.
* | Support large files in the complete toolset. Indexes of thisDavid Kalnischkies2011-09-131-3/+3
| | | | | | | | 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-5/+7
|/
* - load the supported compressors from configurationDavid Kalnischkies2011-02-271-31/+28
| | | - support adding new compressors by configuration
* * ftparchive/multicompress.cc, apt-inst/deb/debfile.cc:David Kalnischkies2011-02-221-0/+1
| | | | - support xz compressor to create xz-compressed Indexes and be able to open data.tar.xz files
* fix a few typos in strings, comments and manpage of apt-ftparchiveDavid Kalnischkies2009-12-011-1/+1
| | | | thanks Karl Goetz! (Closes: #558757)
* tell every method in ftparchive/ that const& is sexyDavid Kalnischkies2009-11-281-7/+7
|
* * ftparchive/contents.cc:Michael Vogt2007-11-301-0/+1
| | | | | | | - fix error output * ftparchive/contents.cc: - support lzma data members * ftparchive/multicompress.cc: - support lzma output
* * remove all the remaining #pragma implementationMichael Vogt2007-06-081-4/+0
|
* Bring consistency to the use of capitals in programs messagesChristian Perrier2005-03-061-3/+3
|
* Merge misc-abi-changesMatt Zimmerman2004-12-131-4/+4
| | | | | | | | | | | | | | | | | Patches applied: * apt@packages.debian.org/apt--misc-abi-changes--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-16 * apt@packages.debian.org/apt--misc-abi-changes--0--patch-1 Fix apt-get -s remove to not display the candidate version * apt@packages.debian.org/apt--misc-abi-changes--0--patch-2 Merge from main * apt@packages.debian.org/apt--misc-abi-changes--0--patch-3 Use pid_t throughout to hold process IDs
* Lots and lots of i18n updates.Arch Librarian2004-09-201-15/+16
| | | | | | Author: doogie Date: 2003-02-10 07:34:41 GMT Lots and lots of i18n updates.
* G++3 fixes from RandolphArch Librarian2004-09-201-1/+4
| | | | | | Author: jgg Date: 2001-05-29 03:48:27 GMT G++3 fixes from Randolph
* Join with aliencodeArch Librarian2004-09-201-0/+494
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode