summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
Commit message (Collapse)AuthorAgeFilesLines
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2012-05-221-4/+15
| | | | - dup() given compressed fd in OpenDescriptor if AutoClose is disabled as otherwise gzclose() and co will close it
* * apt-pkg/contrib/mmap.cc:David Kalnischkies2012-05-211-0/+1
| | | | | - have a dummy SyncToFd around in case of ReadOnly access to a compressed file as we otherwise on Close() do not delete[] the char buffer but munmap() it… (Closes: #673815)
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2012-05-161-24/+41
| | | | - ensure that we close compressed fds, wait for forks and such even if the FileFd itself is set to not autoclose the given Fd
* ensure that d is set before accessing itDavid Kalnischkies2012-05-101-41/+50
|
* ensure that in error conditions the Fail flag is setDavid Kalnischkies2012-05-101-3/+46
|
* collect zombie (de)compressor processes on reopenDavid Kalnischkies2012-05-101-1/+14
|
* ensure that we do init d only once and especially not with its ownDavid Kalnischkies2012-05-091-5/+6
| | | | content as this causes some "interesting" hickups resulting in segfaults as it seems (Closes: #554387, #670979)
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2012-05-091-3/+7
| | | - check that the fd which are closed are valid
* /dev/null is a special absolute path as it has no subdirectoriesDavid Kalnischkies2012-04-231-0/+9
|
* normalize a bit by replacing // and /./ with / in FindFileDavid Kalnischkies2012-04-231-30/+38
|
* * apt-pkg/contrib/configuration.cc:David Kalnischkies2012-04-222-8/+66
| | | - add a more versatile Dump() method
* * apt-pkg/contrib/strutl.cc:David Kalnischkies2012-04-211-20/+37
| | | - remove the message size limit from ioprintf and strprintf
* * apt-pkg/contrib/sha2_internal.cc:David Kalnischkies2012-04-201-2/+6
| | | | | - do not use the input data directly but memcpy it instead as it could be unaligned as in the http-transport which causes a sigbus error on sparc (Closes: #669061)
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2012-04-191-0/+6
| | | - redirect stderr from compressors to /dev/null
* use a static FileFd::Write overload to reduce duplication of write()-retry codeDavid Kalnischkies2012-04-112-0/+23
|
* - add libbz2-dev as new build-dependencyDavid Kalnischkies2012-04-051-9/+98
| | | | | | | | - remove the libz-dev alternative from zlib1g-dev build-dependency - do the same for bz2 builtin if available * apt-pkg/contrib/fileutl.cc: - use libz2 library for (de)compression instead of the bzip2 binary as the first is a dependency of dpkg and the later just priority:optional so we gain 'easier' access to bz2-compressed Translation files this way
* if we have zlib builtin insert add a dummy gzip compressor for FileFDDavid Kalnischkies2012-04-051-1/+0
|
* detect zlib correctly. We still don't allow to build without it to remainDavid Kalnischkies2012-04-051-19/+13
| | | | | compatible with users accessing it directly, but this prepares for a drop of this strict requirement in the future
* * apt-pkg/acquire-worker.cc:David Kalnischkies2012-03-201-2/+1
| | | | | | | | | | | - check return of write() as gcc recommends * apt-pkg/acquire.cc: - check return of write() as gcc recommends * apt-pkg/cdrom.cc: - check return of chdir() and link() as gcc recommends * apt-pkg/clean.cc: - check return of chdir() as gcc recommends * apt-pkg/contrib/netrc.cc: - check return of asprintf() as gcc recommends
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2012-03-061-0/+7
| | | - do not warn about the ignoring of directories (Closes: #662762)
* as we parse datestrings from external sources a lot specify the lengthDavid Kalnischkies2012-03-051-3/+3
| | | | | of the integer fields as well to avoid crashes in scanf as cppchecks warns: "(warning) scanf without field width limits can crash with huge input data"
* * apt-pkg/cachefile.cc:David Kalnischkies2012-02-112-0/+75
| | | - clean up lost atomic cachefiles with 'clean' (Closes: #650513)
* rework previous patch to avoid changing the inline codeMichael Vogt2012-02-032-4/+6
|
* * apt-pkg/contrib/fileutl.h:Michael Vogt2012-02-031-1/+4
| | | - fix compat with FileFd::OpenDescriptor() in ReadOnlyGzip mode
* * apt-pkg/contrib/configuration.cc:David Kalnischkies2012-01-301-2/+8
| | | | | - do not stop parent transversal in FindDir if the value is empty See http://lists.debian.org/deity/2012/01/msg00053.html , too.
* * apt-pkg/contrib/fileutl.h:David Kalnischkies2012-01-181-1/+3
| | | | | | | | | - store the offset in the internal fd before calculate size of the zlib-handled file to jump back to this place again It jumped back to the position of the content - which is wrong as the internal fd is compressed and even reseting to the beginning of the file doesn't work as zlib uses an internal buffer, so while we might haven't read anything yet zlib might have done so already…
* improve error reporting in case of errors in combination with zlibDavid Kalnischkies2012-01-182-6/+16
|
* * apt-pkg/contrib/fileutils.h:Michael Vogt2012-01-161-1/+1
| | | - fix segfault from python-apt testsuite
* g++ 4.7 fixesMichael Vogt2012-01-021-0/+2
|\
| * g++ 4.7 fixesMichael Vogt2012-01-021-0/+2
| |
* | usage of Skipping in pipes can't work, so we ignore-read insteadDavid Kalnischkies2011-12-181-8/+26
| | | | | | | | Also, read only one char in each step of ReadLine instead of back-"seeking"
* | try to avoid direct usage of .Fd() if possible and do read()s and coDavid Kalnischkies2011-12-174-5/+65
| | | | | | | | on the FileFd instead
* | keep track of where we are in a filedescriptor so we can use it as Tell()David Kalnischkies2011-12-171-9/+30
| | | | | | | | information if we are working on a pipe which can't seek
* | try seeking on fds opened with OpenDescriptor before giving upDavid Kalnischkies2011-12-161-1/+8
| |
* | refactor compressor calling so that we don't (need to) export ExecCompressorDavid Kalnischkies2011-12-152-264/+120
| | | | | | | | anymore and therefore are also able to drop quiet a bit of duplicated code
* | use FileFd instead of forking the compression childs by handDavid Kalnischkies2011-12-142-30/+80
| |
* | allow Open() and OpenDescriptor() to be called with a CompressorDavid Kalnischkies2011-12-132-93/+98
| |
* | note to myself: In case you rename something, make sure that you haveDavid Kalnischkies2011-12-131-5/+5
| | | | | | | | | | | | | | renamed it everywhere as otherwise stuff "magically" starts to fail… Fixes commit 2209 as the mixture of #define names generates a lovely compilable but non-functional mixture of gzip usage…
* | revert 2184.1.3: forward declaration instead of headersDavid Kalnischkies2011-12-133-0/+9
| | | | | | | | | | The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
* | revert 2184.1.2: do not pollute namespace in headersDavid Kalnischkies2011-12-1310-0/+47
| | | | | | | | | | The breakage is just to big for now, so guard the change with #ifndef APT_8_CLEANER_HEADERS and be nice to library users
* | Allow the FileFd to use an external Compressor to uncompress a given fileDavid Kalnischkies2011-12-133-12/+309
| | | | | | | | | | | | | | | | | | | | | | 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.
* | - add a ReadLine methodDavid Kalnischkies2011-12-113-33/+93
| | | | | | - drop the explicit export of gz-compression handling
* | * apt-pkg/contrib/fileutl.{h,cc}:David Kalnischkies2011-12-102-0/+15
| | | | | | - implement a ModificationTime method for FileFd
* | enable FileFd to guess the compressor based on the filename if requested orDavid Kalnischkies2011-12-102-20/+123
| | | | | | | | | | to search for compressed silbings of the given filename and use this guessing instead of hardcoding Gzip compression
* | split up the OpenMode into OpenMode and CompressionMode andDavid Kalnischkies2011-11-292-53/+79
|/ | | | | | | provide ReadOnly, WriteOnly and ReadWrite as flags alongside the additional flags as decompression will be one-way later, but certain parts really depend on Write* openmodes being ReadWrite opens, so we will have to fail for those.
* * apt-pkg/contrib/sha2_internal.cc:David Kalnischkies2011-10-301-3/+13
| | | - use a pointer-union to peace gcc strict-aliasing warning
* merge with my debian-sid branchDavid Kalnischkies2011-10-302-25/+18
|\
| * convert a few for-loop char finds to proper strchr and memchrDavid Kalnischkies2011-09-212-25/+18
| |
| * * apt-pkg/contrib/configuration.cc:Michael Vogt2011-09-141-4/+5
| | | | | | | | - fix double delete (LP: #848907) - ignore only the invalid regexp instead of all options
* | * apt-pkg/pkgcachegen.cc:David Kalnischkies2011-10-111-1/+5
| | | | | | - refactor MergeList by creating -Group, -Package and -Version specialist