summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib
AgeCommit message (Collapse)AuthorFilesLines
2014-04-01Add new Debug::RunScripts optionMichael Vogt1-1/+5
This debug option will display all scripts that are run by apts RunScripts and RunScriptsWithPkgs helpers.
2014-03-21mark optional (private) symbols as hiddenDavid Kalnischkies1-3/+3
This methods should not be used by anyone expect the library itself as they are helpers for the specific class and therefore perfect candidates for hidding. Git-Dch: Ignore
2014-03-21enable fvisibility=hidden for our private libraryDavid Kalnischkies1-0/+4
While it is a huge undertaking to enable it for our public libraries as basically everything we exported so far could be seen as public interface our private library is new and under our full control, so we can do whatever we like with it. The benefits are not that big in return of course, but it reduces the size a bit, so thats great nontheless. Git-Dch: ignore
2014-03-21continue reading in xz even if it outputs nothingDavid Kalnischkies1-0/+13
It can happen that content in our buffer is not enough to produce a meaningful output in which case no output is created by liblzma, but still reports that everything is okay and we should go on. The code assumes it has reached the end through if it encounters a null read, so this commit makes it so that it looks like this read was interrupted just like the lowlevel read() on uncompressed files could. It subsequently fixes the issue with that as well as until now our loop would still break even if we wanted it to continue on. (This bug triggers our usual "Hash sum mismatch" error) Reported-By: Stefan Lippers-Hollmann <s.L-H@gmx.de>
2014-03-15Fix handling of autoclosing for compressed files (Closes: #741685)Julian Andres Klode1-1/+1
AutoClose is both an argument in OpenDescriptor() and an enum. In commit 84baaae93badc2da7c1f4f356456762895cef278 code using the AutoClose parameter was moved to OpenDescriptorInternal(). In that function, AutoClose meant the enum value, so the check was always false.
2014-03-14fix test/integration/test-apt-helperMichael Vogt30-362/+680
2014-03-13refactor FileFd to hide some #ifdefsDavid Kalnischkies1-168/+131
They tend to be ugly to look at, so hide them. Git-Dch: Ignore
2014-03-13use liblzma-dev to provide xz/lzma supportDavid Kalnischkies1-35/+245
We have xz/lzma support for a while, but only via an external binary provided by xz-utils. Now that the Debian archive provides xz by default and dpkg pre-depends on the library provided by liblzma-dev we can switch now to use this library as well to avoid requiring an external binary. For now the binary is in a prio:required package, but this might change in the future. API wise it is quiet similar to bz2 code expect that it doesn't provide file I/O methods, so we piece this together on our own.
2014-03-13refactor setup of file opening via zlib/bz2 libDavid Kalnischkies1-37/+36
Git-Dch: Ignore
2014-03-13move fd duplication closer to the gz/bz2 open callsDavid Kalnischkies1-21/+20
Git-Dch: Ignore
2014-03-13support very long mtab entries in mountpoint discoveryDavid Kalnischkies1-25/+23
Old code limited lines to 250 characters which is probably enough for everybody, but who knows… It also takes care of device nodes which start with the same prefix.
2014-03-13no error for non-existing mountpoints in MountCdromDavid Kalnischkies1-8/+20
The mountpoint might be auto-generated by the mount command so pushing an error on the stack will confuse the following code and let it believe an unrecoverable error occured while potentially everything is okay. Same goes for umount as a non-existing mountpoint is by definition not mounted.
2014-03-13if mountpoint has a ".disk" directory it is mountedDavid Kalnischkies1-2/+7
Checking that parent-directory of mountpoint and mountpoint are on different devices is fine most of the time, but is too restrictive for our testcases and there shouldn't be anything wrong with 'normal' users copying disk-contents around either if they want to. We check for the existance of the ".disk/" directory now as this will not be present if the disk isn't 'mounted'. Disks doesn't need to have such a directory through, so for those we fall back to the old way of detecting mounted or not mounted.
2014-03-13follow method attribute suggestions by gccDavid Kalnischkies8-30/+34
Git-Dch: Ignore Reported-By: gcc -Wsuggest-attribute={pure,const,noreturn}
2014-03-13cleanup headers and especially #includes everywhereDavid Kalnischkies27-91/+144
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-03-13move defines for version to macros.hDavid Kalnischkies1-17/+67
also adds namespaced attributes for good usage Git-Dch: Ignore
2014-03-13warning: cannot optimize loop, the loop counter may overflow ↵David Kalnischkies1-1/+1
[-Wunsafe-loop-optimizations] Git-Dch: Ignore Reported-By: gcc -Wunsafe-loop-optimizations
2014-03-13warning: useless cast to type A [-Wuseless-cast]David Kalnischkies4-5/+5
Git-Dch: Ignore Reported-By: gcc -Wuseless-cast
2014-03-13warning: cast from type A to type B casts away qualifiers [-Wcast-qual]David Kalnischkies3-24/+24
Git-Dch: Ignore Reported-By: gcc -Wcast-qual
2014-03-13warning: extra ‘;’ [-Wpedantic]David Kalnischkies6-30/+29
Git-Dch: Ignore Reported-By: gcc -Wpedantic
2014-03-13make doxygen more quiet, fix issues and disable latexDavid Kalnischkies1-2/+2
Git-Dch: Ignore
2014-03-13add default and override handling for Cnf::FindVectorDavid Kalnischkies3-4/+30
Automatically handle the override of list options via its parent value which can even be a comma-separated list of values. It also adds an easy way of providing a default for the list.
2014-03-12add hashsum support in apt-file download and add more testsMichael Vogt2-0/+12
2014-02-22Fix typos in documentation (codespell)Michael Vogt12-20/+20
2014-02-14simplify code some more to make reddit happyDavid Kalnischkies1-38/+29
Commit 6008b79adf1d7ea5607fab87a355d664c8725026 should have been guarded by "Git-Dch: Ignore", but it wasn't and I only noticed it with the Close message via deity thinking "hehe, I wonder if someone is gonna notice". Looks like someone did: hats off to reddit user itisOmegakai! Good to know that what I do isn't only monitored by goverments. :) As there is another instance of basically the same code we just factor out the code a bit and reuse, so its even cleaner and not only simpler. Reported-By: scan-build
2014-02-10simplify code to make compilers happyDavid Kalnischkies1-3/+9
Does the same as before, but is a bit simpler on the logic for humans as well as compilers. scan-build complained about it at least with: "Result of operation is garbage or undefined" Reported-By: scan-build
2014-01-26Merge remote-tracking branch 'donkult/debian/sid' into debian/sidMichael Vogt5-15/+18
Conflicts: apt-private/private-list.cc doc/po/de.po test/integration/framework
2014-01-16correct some style/performance/warnings from cppcheckDavid Kalnischkies4-11/+8
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
2014-01-16rework some code to fix some scan-build warningsDavid Kalnischkies2-4/+10
No visible functional changes, just code moved around and additional checks to eliminate impossible branches Reported-By: scan-build Git-Dch: Ignore
2014-01-05Merge remote-tracking branch 'donkult/feature/clientmergepdiffs' into ↵Michael Vogt1-1/+1
debian/experimental-no-abi-break
2013-12-23add basic tests for GetTempDir()Michael Vogt1-1/+1
2013-12-22factor GetTempDir outMichael Vogt3-13/+21
2013-12-22apt-pkg/contrib/gpgv.cc: use /tmp as fallback dirThomas Bechtold1-1/+6
if the directory given by $TMPDIR is not available, use /tmp as fallback.
2013-12-13allow ':' in GetListOfFilesInDirDavid Kalnischkies1-1/+1
run-parts doesn't allow this char in valid filenames, but we tend to have files with this character in e.g. /var/lib/apt/lists/ Git-Dch: Ignore
2013-11-30truncating /dev/null to zero is always successfulDavid Kalnischkies1-0/+3
Calling truncate on /dev/null can happen by the download methods if they are instructed to download a file to /dev/null (as testcases are only interested in the status code, but do not support HEAD requests yet) So just ignore truncate calls on the /dev/null file as it is always empty anyway, so truncating to zero isn't a problem. Git-Dch: Ignore
2013-11-29Merge remote-tracking branch 'mvo/debian/sid' into debian/sidMichael Vogt4-5/+38
Conflicts: apt-private/private-cmndline.cc
2013-11-29add "APT::String::Endswith" and automatic adding of ".list" in apt edit-sourceMichael Vogt2-0/+9
2013-11-28fix regression that APT::Keep-Fds is not honored (closes: #730490)Michael Vogt2-8/+19
2013-11-26add check when sources.list changedMichael Vogt2-5/+29
2013-11-01small documentation updates0.9.13_exp1Michael Vogt1-1/+2
2013-10-31add new pid_t ExecFork(std::set<int> KeepFDs) to get rid of the super ugly ↵Michael Vogt2-14/+21
APT::Keep-Fds hack and also add a new PackageManagerProgressFd::StartDpkg() progress state
2013-10-18re-add missing APT::String::StripMichael Vogt2-1/+23
2013-10-07fix libapt-inst for >2G debs (closes: #725483)Michael Vogt1-8/+8
2013-10-01change maxsplit default from "0" to maxintMichael Vogt2-3/+3
2013-10-01improve documentation for StringSplit()Michael Vogt2-6/+19
2013-09-07doc updateMichael Vogt2-8/+17
2013-09-07add maxsplit parameter to StringSplitMichael Vogt2-6/+14
2013-09-07implement StringSplit() as we need this to fix the dpkg status-fd output parsingMichael Vogt2-0/+24
2013-08-31fix typo (mkostemp->mkstemp)Michael Vogt1-1/+1
2013-08-27use mkstemp instead of mkostemp in FileFd::Open()David Kalnischkies1-8/+4
FileFd currently supports no fileflags which would make sense to provide via mkostemp, so we can just use mkstemp here which is a standard function compared to glib extension mkostemp. O_CREAT (Create) and O_TRUNC (Empty) are implied by O_EXCL, which is the mode mkstemp uses by default. The file description is opened ReadWrite, but that used to be the default for FileFd in the old times and not a problem as the difference is needed by FileFd to decide in which way the compressor pipeline needs to be created (if any). Git-Dch: Ignore