summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
Commit message (Collapse)AuthorAgeFilesLines
* [ Martin Pitt ]David Kalnischkies2010-07-111-7/+54
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-241-5/+9
| | | | | | | | 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-091-6/+41
| | | | | | | | - Add support for transparent reading of gzipped files. - Link against zlib (in apt-pkg/makefile) and add zlib build dependency.
* | 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.
* | merge with debian-experimental-maDavid Kalnischkies2010-07-051-5/+15
|\ \
| * | Fix the atomic replace.Julian Andres Klode2010-06-291-1/+1
| | |
| * | * apt-pkg/contrib/fileutl.cc:Julian Andres Klode2010-06-291-5/+15
| | | | | | | | | - Make FileFd replace files atomically in WriteTemp mode (for cache, etc).
* | | * 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 *
* | * apt-pkg/contrib/fileutl.cc:David Kalnischkies2010-04-071-0/+52
| | | | | | | | | | | | | | | | | | | | - 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-041-5/+0
|/
* * apt-pkg/contrib/fileutl.cc:Michael Vogt2010-01-231-5/+79
| | | | | | | | | | | | | | | | | | | | | | | | - Fix the newly introduced method GetListOfFilesInDir to not accept every file if no extension is enforced (= restore old behaviour). (Closes: #565213) * apt-pkg/policy.cc: - accept also partfiles with "pref" file extension as valid * apt-pkg/contrib/configuration.cc: - accept also partfiles with "conf" file extension as valid * doc/apt.conf.5.xml: - reorder description and split out syntax - add partfile name convention (Closes: #558348) * doc/apt_preferences.conf.5.xml: - describe partfile name convention also here * apt-pkg/deb/dpkgpm.cc: - don't segfault if term.log file can't be opened. Thanks Sam Brightman for the patch! (Closes: #475770) * doc/*: - replace the per language addendum with a global addendum - add a explanation why translations include (maybe) english parts to the new global addendum (Closes: #561636) * apt-pkg/contrib/strutl.cc: - fix malloc asseration fail with ja_JP.eucJP locale in apt-cache search. Thanks Kusanagi Kouichi! (Closes: #548884)
* * French manpage translation updateMichael Vogt2010-01-081-0/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | * spot & fix various typos in all manpages * German manpage translation update * cmdline/apt-cache.cc: - remove translatable marker from the "%4i %s\n" string * buildlib/po4a_manpage.mak: - instruct debiandoc to build files with utf-8 encoding * buildlib/tools.m4: - fix some warning from the buildtools * apt-pkg/acquire-item.cc: - add configuration PDiffs::Limit-options to not download too many or too big patches (Closes: #554349) * debian/control: - let all packages depend on ${misc:Depends} * share/*-archive.gpg: - remove the horrible outdated files. We already depend on the keyring so we don't need to ship our own version * cmdline/apt-key: - errors out if wget is not installed (Closes: #545754) - add --keyring option as we have now possibly many * methods/gpgv.cc: - pass all keyrings (TrustedParts) to gpgv instead of using only one trusted.gpg keyring (Closes: #304846) * methods/https.cc: - finally merge the rest of the patchset from Arnaud Ebalard with the CRL and Issuers options, thanks! (Closes: #485963)
* [apt-pkg/contrib/fileutl.cc] In function ExecWait(): fix compile warning:David Kalnischkies2009-08-031-0/+2
| | | | warning: suggest explicit braces to avoid ambiguous ‘else’
* * apt-pkg/acquire-worker.cc:Michael Vogt2009-07-021-2/+5
| | | | | | | | - show error details of failed methods * apt-pkg/contrib/fileutl.cc: - if a process aborts with signal, show signal number * methods/http.cc: - ignore SIGPIPE, we deal with EPIPE from write in HttpMethod::ServerDie() (LP: #385144)
* Apply patch to avoid truncating of arbitrary files. Thanks to BryanOtavio Salvador2008-05-231-1/+3
| | | Donlan <bdonlan@fushizen.net> for the patch. Closes: #482476
* * merged the apt--DoListUpdate branch, this provides a common interfaceMichael Vogt2008-01-041-1/+66
|\ | | | | | | for apt-get update like operations for the frontends and also provides hooks to run stuff in APT::Update::{Pre,Post}-Invoke
| * * apt-pkg/deb/dpkgpm.cc, apt-pkg/contrib/fileutl.{cc,h}:Michael Vogt2006-06-071-1/+66
| | | | | | | | | | | | - move the RunScripts() code into fileutl.{cc,h} * apt-pkg/cachefile.cc: - add support for "APT::Update::{Pre,Post}-Invoke" scripts
* | * make apt build with g++ 4.3Michael Vogt2007-09-101-0/+2
| |
* | * Removed the more leftover #pragma interface/implementationMichael Vogt2007-06-081-3/+0
|\ \ | | | | | | closes: #306937 (thanks to Andreas Henriksson for the patch)
| * | * remove all the remaining #pragma implementationMichael Vogt2007-06-081-3/+0
| |/
* / * fix FTBFS with gcc 4.3, closes: #417090Michael Vogt2007-06-081-0/+1
|/ | | (thanks to Martin Michlmayr for the patch)
* * merged from mainMichael Vogt2005-08-091-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: * apt@packages.debian.org/apt--main--0--patch-106 Restore lost changelog entries * apt@packages.debian.org/apt--main--0--patch-107 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-108 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-109 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-110 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-85 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-1 * inital proof of concept code, understands what dpkg tells it already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-2 * progress reporting works now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-3 * added "APT::Status-Fd" variable * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-4 * do i18n now too * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-5 * define N_(x) if it is not defined already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-6 * PackageManager::DoInstall(int status_fd) added (does not break the ABI) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-7 * merged with apt--fixes--0 to make it build again * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-8 * added support for "error" and "conffile-prompt" messages from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-9 merge with main * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-10 * use sizeof() for all snprintf() uses; fix a potential line break problem in the status reading code; changed the N_() to _() calls * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-11 * added APT::KeepFDs configuration list for file descriptors that apt should leave open (needed for various frontends like debconf, synaptic) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-12 * fixed a API breakage * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-13 * doc added, should be releasable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-14 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-15 * more source comments, added Debug::DpkgPM debug code to inspect the dpkg<->apt communication, broke the abi (ok with matt) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-16 * the progress reporting has it's own "Debug::pkgDPkgProgressReporting" debug variable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-17 * merged PackageOps and TranslatedPackageOps into a single Map with the new DpkgState struct * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-18 * clear the APT::Keep-Fds configuration when it's no longer needed * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-19 * rewrote the reading from dpkg so that it never blocks * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-20 * merged the two status arrays into one * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-21 * added support for download progress reporting too (for Kamion and base-config) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-22 * ABI break; added Configuration::Clear(string List, {int,string} value) added (to remove a single Value from a list); test/conf_clear.cc added * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23 * remvoed a debug string * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24 * soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25 * merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26 * fix a bug when out-of-order states are send from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27 * changelog update * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28 * a real changelog entry now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-29 * changelog finalized * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-30 * propper (and sane) support for pmerror and pmconffile added
* Bring consistency to the use of capitals in programs messagesChristian Perrier2005-03-061-1/+1
|
* Merge michael.vogt@canonical.com--2004/apt--status-fd--0Matt Zimmerman2005-01-191-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patches applied: * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-32 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-1 * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-2 * changed version of the library * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-3 * merged with matt again * michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-4 * merged with apt--main--0 and fixed permissions in po/ * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-1 tag of michael.vogt@canonical.com--2004--laptop/apt--status-fd--0--patch-4 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-2 * merged with matt's tree * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-3 * removed a stupid "<<<" merge in the changelog * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-4 * star-merged with apt@packages.debian.org/apt--main--0 * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-5 * removed the "pre-fork/post-fork" change and put it into it's own branch, star-merged with matt so that it applies cleanly * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-6 * cleaned a incorrect log-file merge * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-7 * removed a conflict in =tagging-method * michael.vogt@canonical.com--2004/apt--status-fd--0--patch-8 * cleaned up the delta so that it no longer contains unreleated whitespace changes
* Merge misc-abi-changesMatt Zimmerman2004-12-131-2/+2
| | | | | | | | | | | | | | | | | 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
* PD licenseArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 2002-09-14 05:28:38 GMT PD license
* Correct neuros problem with no source directoryArch Librarian2004-09-201-3/+3
| | | | | | Author: jgg Date: 2002-04-24 05:02:40 GMT Correct neuros problem with no source directory
* Speeling correctionArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 2002-04-18 05:08:49 GMT Speeling correction
* G++3 fixes from RandolphArch Librarian2004-09-201-1/+4
| | | | | | Author: jgg Date: 2001-05-07 05:25:13 GMT G++3 fixes from Randolph
* Tag file can read from unseekable objectsArch Librarian2004-09-201-3/+8
| | | | | | Author: jgg Date: 2001-04-22 05:42:52 GMT Tag file can read from unseekable objects
* fixed typo in fileutl.cc (damn you, studly caps...)Arch Librarian2004-09-201-3/+3
| | | | | | | Author: tausq Date: 2001-03-03 22:45:59 GMT fixed typo in fileutl.cc (damn you, studly caps...) make apt-extracttemplates use FileFd
* new tempfile writing mode (WriteTemp) for FileFd classArch Librarian2004-09-201-1/+6
| | | | | | Author: tausq Date: 2001-03-03 22:36:20 GMT new tempfile writing mode (WriteTemp) for FileFd class
* Join with aliencodeArch Librarian2004-09-201-26/+81
| | | | | | Author: jgg Date: 2001-02-20 07:03:16 GMT Join with aliencode
* More CD fixesArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 2000-01-17 07:11:49 GMT More CD fixes
* HP-UX fixesArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-12-10 23:40:29 GMT HP-UX fixes
* Fixes for SolarisArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-12-09 21:18:01 GMT Fixes for Solaris
* Bug fixesArch Librarian2004-09-201-1/+40
| | | | | | Author: jgg Date: 1999-09-30 06:30:34 GMT Bug fixes
* Minor cleanups, fix for checksum lowercase bugArch Librarian2004-09-201-2/+51
| | | | | | Author: jgg Date: 1999-07-26 17:46:07 GMT Minor cleanups, fix for checksum lowercase bug
* Daniel Jacobowitz's gcc 2.95 C++ patchArch Librarian2004-09-201-1/+15
| | | | | | Author: jgg Date: 1999-07-20 05:53:32 GMT Daniel Jacobowitz's gcc 2.95 C++ patch
* Added an open functionArch Librarian2004-09-201-9/+9
| | | | | | Author: jgg Date: 1999-07-11 22:42:32 GMT Added an open function
* Working apt-get source build stuffArch Librarian2004-09-201-1/+36
| | | | | | Author: jgg Date: 1999-04-20 05:02:09 GMT Working apt-get source build stuff
* Oops typoArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-03-21 07:24:14 GMT Oops typo
* Made NFS locking bail outArch Librarian2004-09-201-1/+6
| | | | | | Author: jgg Date: 1999-03-20 03:49:31 GMT Made NFS locking bail out
* Wichert and Espys bugsArch Librarian2004-09-201-2/+2
| | | | | | Author: jgg Date: 1999-03-17 03:25:25 GMT Wichert and Espys bugs
* Signal safetyArch Librarian2004-09-201-19/+73
| | | | | | Author: jgg Date: 1999-03-16 00:43:55 GMT Signal safety
* Minor fixes for FTP supportArch Librarian2004-09-201-4/+19
| | | | | | Author: jgg Date: 1999-03-15 08:10:39 GMT Minor fixes for FTP support
* Fixed WaitFDArch Librarian2004-09-201-6/+10
| | | | | | Author: jgg Date: 1999-02-16 04:18:35 GMT Fixed WaitFD
* modified WaitFd in fileutl to support passing a timeoutArch Librarian2004-09-201-6/+13
| | | | | | Author: doogie Date: 1999-02-12 20:47:41 GMT modified WaitFd in fileutl to support passing a timeout
* Minor fixesArch Librarian2004-09-201-1/+2
| | | | | | Author: jgg Date: 1999-02-08 07:30:49 GMT Minor fixes