summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
Commit message (Collapse)AuthorAgeFilesLines
* apt-pkg/contrib/fileutl.cc: fix FileFd::Size() for files that are empty or ↵Michael Vogt2010-10-131-5/+10
| | | | for non-gzip files
* * apt-pkg/contrib/fileutl.cc:Martin Pitt2010-10-131-1/+20
| | | | | - Fix FileFd::Size() for gzipped files to give the size of the uncompressed data. This fixes cache progress building progress going way over 100%.
* * apt-pkg/contrib/strutl.cc:David Kalnischkies2010-09-281-2/+2
| | | - add a space between number and unit as required by SI (Closes: #598352)
* merged from lp:~mvo/apt/mvoMichael Vogt2010-09-101-3/+21
|\
| * apt-pkg/contrib/cdromutl.cc: do not take Buf.f_bfree into account on ↵Michael Vogt2010-09-101-4/+12
| | | | | | | | writable media
| * apt-pkg/contrib/cdromutl.cc: style fixes (thanks to David for his code-review)Michael Vogt2010-09-101-3/+3
| |
| * * apt-pkg/contrib/cdromutl.cc:Michael Vogt2010-09-101-0/+10
| | | | | | | | | | | | - if apt-cdrom is used on writable media (like usb-sticks), do not use the root directory to identify the medium (as all changes there change the ident id). Use the .disk directory instead
* | rename the newly public CheckDirectory method to CreateAPTDirectoryIfNeededDavid Kalnischkies2010-09-062-3/+3
|/ | | | to give a better indication what this method will do if called.
* * apt-pkg/deb/dpkgpm.cc:David Kalnischkies2010-09-022-0/+30
| | | | | | | - create Dir::Log if needed to support /var/log as tmpfs or similar, inspired by Thomas Bechtold, thanks! (Closes: #523919, LP: #220239) Easily done by moving a private method from pkgAcquire into the public area of fileutl.cc to be able to use it also in here
* * apt-pkg/contrib/configuration.cc:David Kalnischkies2010-08-282-3/+12
| | | | - fix autoremove by using correct config-option name and don't make faulty assumptions in error handling (Closes: #594689)
* * apt-pkg/contrib/fileutl.cc:David Kalnischkies2010-08-281-1/+2
| | | - apply SilentlyIgnore also on files without an extension
* * apt-pkg/contrib/strutl.cc:David Kalnischkies2010-08-161-1/+1
| | | | | | | - fix error checking for vsnprintf in its safe variant Spotted by -Wextra: contrib/strutl.cc: In function 'char* safe_snprintf(char*, char*, const char*, ...)': contrib/strutl.cc:1172:14: warning: comparison of unsigned expression < 0 is always false
* apt-pkg/contrib/fileutl.cc: Revert WriteEmpty to old behavior (LP: #613211)Julian Andres Klode2010-08-101-1/+8
|
* apt-pkg/contrib/fileutl.cc: Add WriteAtomic mode.Julian Andres Klode2010-08-102-1/+4
|
* - [ABI BREAK] add an ErrorType option to CacheSetHelperDavid Kalnischkies2010-07-302-0/+32
| | | | | * cmdline/apt-cache.cc: - use Notice instead of Error in the CacheSetHelper messages for compat reasons. Otherwise tools like sbuild blow up
* add inline DumpError() to avoid subtle API breakMichael Vogt2010-07-291-1/+13
|
* * apt-pkg/contrib/error.{cc,h}Michael Vogt2010-07-292-7/+8
| | | - docstring cleanup
* * apt-pkg/contrib/fileutl.cc:Julian Andres Klode2010-07-232-0/+22
| | | - Add FileFd::OpenDescriptor() (needed for python-apt's #383617).
* [ Martin Pitt ]David Kalnischkies2010-07-112-12/+62
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * debian/rules: - Make DEB_BUILD_OPTIONS=noopt actually work by passing the right CXXFLAGS. * apt-pkg/contrib/fileutl.{h,cc}: - Add support for reading of gzipped files with the new "ReadOnlyGzip" OpenMode. (Closes: #188407) - Link against zlib (in apt-pkg/makefile) and add zlib build dependency. - [ABI BREAK] This adds a new private member to FileFd, but its initialization is in the public header file. * configure.in: - Check for zlib library and headers. * apt-pkg/acquire-item.cc, apt-pkg/deb/debindexfile.cc, apt-pkg/deb/debrecords.cc, apt-pkg/deb/debsrcrecords.h, cmdline/apt-cache.cc: - Open Packages, Sources, and Translations indexes in "ReadOnlyGzip" mode. * apt-pkg/deb/debindexfile.cc: - If we do not find uncompressed package/source/translation indexes, look for gzip compressed ones. * apt-pkg/acquire-item.cc: - If the Acquire::GzipIndexes option is true and we download a gzipped index file, keep it as it is (and rename to .gz) instead of uncompressing it. * doc/apt.conf.5.xml: - Document the new Acquire::GzipIndexes option. * doc/po/apt-doc.pot, doc/po/de.po: - German translation of new Acquire::GzipIndexes option. * Add test/test-indexes.sh: - Test behaviour of index retrieval and usage, in particular with uncompressed and gzip compressed indexes. * methods/gzip.cc: With FileFd now being able to read gzipped files, there is no need for the gzip method any more to spawn an external gzip process. Rewrite it to use FileFd directly, which makes the code a lot simpler, and also using less memory and overhead.
| * FileFd(): Drop file name extension check in ReadOnlyGzip modemartin@piware.de2010-07-061-3/+11
| | | | | | | | | | | | | | | | | | | | Drop the ".gz" extension check in FileFd::Open() in ReadOnlyGzip mode, to not depend on a particular file extension. This allows rewriting the gzip method using internal decompression (on ".decomp" files). This requires a zlib bug workaround in FileFd::Close(): When opening an empty file with gzdopen(), gzclose() fails with Z_BUF_ERROR. Do not count this as a failure.
| * Switch FileFd to not transparently gunzip, since that breaks code which ↵martin@piware.de2010-06-242-6/+10
| | | | | | | | expects the compressed contents to stay (such as the copy backend, or when using file:// repositories. Instead, introduce a new ReadOnlyGzip mode and use that where needed
| * * apt-pkg/contrib/fileutl.{h,cc}:martin@piware.de2010-06-092-9/+47
| | | | | | | | - Add support for transparent reading of gzipped files. - Link against zlib (in apt-pkg/makefile) and add zlib build dependency.
* | * apt-pkg/contrib/error.{cc,h}:David Kalnischkies2010-07-102-7/+6
| | | | | | | | - remove constness of va_list parameter to fix build on amd64 and co Thanks Eric Valette! (Closes: #588610)
* | check the state of the FileFd before renaming as otherwise the renameDavid Kalnischkies2010-07-091-6/+8
| | | | | | | | | | will be tried twice e.g. in an "apt-get update" run and every other piece of code closing the FileFd manual before the destructor will do it again.
* | * doc/apt.conf.5.xml:David Kalnischkies2010-07-091-0/+2
| | | | | | - add and document APT::Cache-{Start,Grow,Limit} options for mmap control
* | * apt-pkg/pkgcachegen.{cc,h}:David Kalnischkies2010-07-081-9/+18
| | | | | | | | - make the used MMap moveable (and therefore dynamic resizeable) by applying (some) mad pointer magic (Closes: #195018)
* | merge with debian-experimental-maDavid Kalnischkies2010-07-052-6/+17
|\ \
| * | Fix the atomic replace.Julian Andres Klode2010-06-291-1/+1
| | |
| * | * apt-pkg/contrib/fileutl.cc:Julian Andres Klode2010-06-292-6/+17
| | | | | | | | | - Make FileFd replace files atomically in WriteTemp mode (for cache, etc).
* | | make the MMap Grow Error a fatal one as while in theory the code shouldDavid Kalnischkies2010-06-261-1/+1
| | | | | | | | | | | | never segfault it still tend to do it so better show it directly
* | | * apt-pkg/contrib/fileutl.cc:David Kalnischkies2010-06-261-0/+4
| | | | | | | | | | | | | | | - show notice about ignored file instead of being always silent - add a Dir::Ignore-Files-Silently list option to control the notice *
* | | - use the new MatchAgainstConfig for the DefaultRootSetFuncDavid Kalnischkies2010-06-262-1/+61
| | | | | | | | | | | | * apt-pkg/contrib/configuration.{cc,h}: - add a wrapper to match strings against configurable regex patterns
* | | add a simple stack handling to be able to delay error handlingDavid Kalnischkies2010-06-252-2/+65
| | |
* | | * apt-pkg/contrib/error.{cc,h}:David Kalnischkies2010-06-252-207/+356
|/ / | | | | | | - complete rewrite but use the same API - add NOTICE and DEBUG as new types of a message
* | be sure that the RFC1123StrToTime method is run in a LANG=C environmentDavid Kalnischkies2010-06-091-2/+6
| |
* | - backport forgotten Valid-Until patch from the obsolete experimentalDavid Kalnischkies2010-06-092-21/+55
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | branch to prevent replay attacks better, thanks to Thomas Viehmann for the initial patch! (Closes: #499897) * doc/apt.conf.5.xml: - document the new Valid-Until related options * apt-pkg/contrib/strutl.cc: - split StrToTime() into HTTP1.1 and FTP date parser methods and use strptime() instead of some self-made scanf mangling - use the portable timegm shown in his manpage instead of a strange looking code copycat from wget * ftparchive/writer.cc: - add ValidTime option to generate a Valid-Until header in Release file
| * | move the users away from the deprecated StrToTime() methodDavid Kalnischkies2010-06-091-2/+2
| | |
| * | use the portable timegm shown in his manpage instead of a strangeDavid Kalnischkies2010-06-091-20/+16
| | | | | | | | | looking code copycat from wget
| * | * apt-pkg/contrib/strutl.cc:David Kalnischkies2010-06-082-1/+39
| | | | | | | | | | | | - split StrToTime() into HTTP1.1 and FTP date parser methods and use strptime() instead of some selfmade scanf mangling
* | | * apt-pkg/contrib/cmdline.cc:David Kalnischkies2010-05-311-2/+2
|/ / | | | | - fix segfault in SaveInConfig caused by writing over char[] sizes
* | * contrib/mmap.cc:David Kalnischkies2010-05-131-2/+2
| | | | | | | | - clarify "MMap reached size limit" error message, thanks Ivan Masár!
* | * apt-pkg/contrib/weakptr.h:Julian Andres Klode2010-05-041-0/+62
| | | | | | | | | | | | - add a class WeakPointable which allows one to register weak pointers to an object which will be set to NULL when the object is deallocated. * [ABI break] apt-pkg/acquire{-worker,-item,}.h: - subclass pkgAcquire::{Worker,Item,ItemDesc} from WeakPointable.
* | * apt-pkg/contrib/configuration.cc:David Kalnischkies2010-04-241-0/+2
| | | | | | - error out if #clear directive has no argument
* | * apt-pkg/contrib/fileutl.cc:David Kalnischkies2010-04-072-0/+55
| | | | | | | | | | | | | | | | | | | | - add a parent-guarded "mkdir -p" as CreateDirectory() * apt-pkg/acquire.{cc,h}: - add a delayed constructor with Setup() for success reporting - check for and create directories in Setup if needed instead of error out unfriendly in the Constructor (Closes: #523920, #525783) - optional handle a lock file in Setup() * cmdline/apt-get.cc: - remove the lock file handling and let Acquire take care of it instead
* | remove the ABI compatible stub for GetListOfFilesInDirDavid Kalnischkies2010-04-042-9/+1
| |
* | Userinfo is urlencoded in URIs (RFC 3986)David Kalnischkies2010-03-312-6/+16
| | | | | | | | | | | | | | | | | | Thanks to Jean-Baptiste Lallement for spotting and fixing it! * apt-pkg/contrib/strutl.cc: - always escape '%' (LP: #130289) (Closes: #500560) - unescape '%' sequence only if followed by 2 hex digit - username/password are urlencoded in proxy string (RFC 3986)
* | rename ExplodeString to VectorizeStringDavid Kalnischkies2010-03-302-4/+4
| |
* | replace every call to toupper with one to our own tolower_asciiDavid Kalnischkies2010-03-304-46/+42
| | | | | | | | | | | | | | | | | | | | This sounds like a premature optimization and since Mr. Knuth we all know that they are the root of all evil - but, and here it starts to be interesting: As the tolower_ascii method is by far the most called method we have (~60 Mio. times) and as we compare only strings containing ascii characters (package names, configuration options) using our own method reduces execution time of APT by 4% plus it avoids that the locale settings can influence us.
* | merge MultiArch-ABI. We don't support MultiArch yet (as most other tools),David Kalnischkies2010-03-181-16/+16
|\ \ | | | | | | | | | | | | but we support the usage of the new ABI so libapt users can start to prepare for MultiArch (Closes: #536029)
| * \ criss-cross merge with my sid branchDavid Kalnischkies2010-02-182-11/+12
| |\ \