summaryrefslogtreecommitdiff
path: root/ftparchive/multicompress.cc
AgeCommit message (Collapse)AuthorFilesLines
2015-11-04wrap every unlink call to check for != /dev/nullDavid Kalnischkies1-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
2015-05-11rewrite all TFRewrite instances to use the new pkgTagSection::WriteDavid Kalnischkies1-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.
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies1-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)
2014-02-11use utimes instead of utimensat/futimensDavid Kalnischkies1-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
2014-02-06multicompress with externals sets wrong file modesColin Watson1-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
2014-01-16correct some style/performance/warnings from cppcheckDavid Kalnischkies1-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
2011-12-14remove the second usage instance of ExecCompressor in ftparchiveDavid Kalnischkies1-33/+9
by again using the FileFd directly
2011-12-14use FileFd instead of forking the compression childs by handDavid Kalnischkies1-27/+3
2011-12-13Allow the FileFd to use an external Compressor to uncompress a given fileDavid Kalnischkies1-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.
2011-09-13merge with debian/experimentalDavid Kalnischkies1-4/+4
2011-09-13Support large files in the complete toolset. Indexes of thisDavid Kalnischkies1-3/+3
size are pretty unlikely for now, but we need it for deb packages which could become bigger than 4GB now (LP: #815895)
2011-09-13reorder includes: add <config.h> if needed and include it at firstDavid Kalnischkies1-5/+7
2011-08-11cppcheck complains about some possible speed improvements which could beDavid Kalnischkies1-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.
2011-02-27 - load the supported compressors from configurationDavid Kalnischkies1-31/+28
- support adding new compressors by configuration
2011-02-22* ftparchive/multicompress.cc, apt-inst/deb/debfile.cc:David Kalnischkies1-0/+1
- support xz compressor to create xz-compressed Indexes and be able to open data.tar.xz files
2009-12-01fix a few typos in strings, comments and manpage of apt-ftparchiveDavid Kalnischkies1-1/+1
thanks Karl Goetz! (Closes: #558757)
2009-11-28tell every method in ftparchive/ that const& is sexyDavid Kalnischkies1-7/+7
2007-11-30* ftparchive/contents.cc:Michael Vogt1-0/+1
- fix error output * ftparchive/contents.cc: - support lzma data members * ftparchive/multicompress.cc: - support lzma output
2007-06-08* remove all the remaining #pragma implementationMichael Vogt1-4/+0
2005-03-06Bring consistency to the use of capitals in programs messagesChristian Perrier1-3/+3
2004-12-13Merge misc-abi-changesMatt Zimmerman1-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
2004-09-20Lots and lots of i18n updates.Arch Librarian1-15/+16
Author: doogie Date: 2003-02-10 07:34:41 GMT Lots and lots of i18n updates.
2004-09-20G++3 fixes from RandolphArch Librarian1-1/+4
Author: jgg Date: 2001-05-29 03:48:27 GMT G++3 fixes from Randolph
2004-09-20Join with aliencodeArch Librarian1-0/+494
Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode