summaryrefslogtreecommitdiff
path: root/python
AgeCommit message (Collapse)AuthorFilesLines
2015-07-05Merge git://anonscm.debian.org/apt/python-aptIgor Pashev25-1111/+502
Conflicts: debian/changelog python/apt_pkgmodule.cc
2015-06-11python/tarfile.cc: LFS: Handle too large fileJulian Andres Klode1-7/+31
Handle both file sizes larger than SIZE_MAX and allocation failures when reading the data of a tarmember. If using the go() function with a callback, pass None as the data parameter for files that are too large. For extractdata, raise a MemoryError if the file too extract is too large. Also check for an existing error first in extractdata, before raising a new one. Test the whole thing on 32-bit platforms with a sample deb that contains a zeroed file that is 5GB large (compressed using xz at level 1 to a few kb).
2015-06-10Acquire: Document that items may have transient errors on run() successJulian Andres Klode1-4/+5
If run() succeeded, items may still have transient errors, like a Not Found error. Closes: #680997
2015-06-10python/arfile.cc: LFS: Use long long instead of long for file sizesJulian Andres Klode1-3/+3
This should make large files in ar archives work. See Bug: #742885
2015-06-10python/arfile.cc: Do not allow files larger than SIZE_MAX to be mappedJulian Andres Klode1-1/+13
Also catch failed allocations, in case size is still too large. This prepares for large file support, see Bug#742885
2015-06-10apt_pkg.Package: Drop the unset 'auto' attributeJulian Andres Klode1-4/+0
If somebody uses that, it could assume that no package is auto removable, because the attribute is always 0. So let's just remove that instead of having crazy code working the way it's not intended. Closes: #565364
2015-06-10TagFile: Provide close() and context managerJulian Andres Klode1-0/+58
This is mostly meant to be used with tag files that are opened with a path, rather than a file object. Closes: #748922
2015-06-10python/cache.cc: Handle deprecation of pkgCache::PkgIterator::Section()Julian Andres Klode1-6/+12
Ignore the deprecation from the C++ compiler and generate a warning for the Python interpreter. Also, remove the section from the representation of the package.
2015-05-22rename "md5" keyword argument in AcquireFile() to "hash" and add backward ↵Michael Vogt1-9/+26
compatiblity
2015-05-07Add MULTI_ARCH_NO constant and deprecate MULTI_ARCH_NONEMichael Vogt1-1/+3
Thanks to Johannes Schauer closes: #782802
2014-11-06Add binding for apt_pkg.maybe_open_clear_signed_file()Michael Vogt1-0/+23
2014-11-06add apt_pkg.sha512sum()Michael Vogt1-2/+48
2014-10-14python/tarfile.cc: use long long in Process() for APT >= 4.14Michael Vogt1-1/+10
The pkgDirStream::Process() signature has changed in apt and is using a long long now for Size and Pos.
2014-09-30Embed changelog entry date and time instead of build date and timeJulian Andres Klode1-2/+7
This makes reproducible builds possible. For non-package builds, simply use the start of the Unix time. Also make sure that all time values are in the UTC timezone. Closes: #762674
2014-09-03fix testsMichael Vogt1-1/+1
2014-09-02python/tag.cc: ensure that the final \n is there when duplicating section dataMichael Vogt1-4/+7
2014-06-10libapt uses pkgSourceRecords::Step() tooMichael Vogt1-2/+2
2014-06-10add apt_pkg.SourceRecords.step() to all steping through all SrcRecordsMichael Vogt1-0/+24
2014-06-10Revert "Merge remote-tracking branch 'mvo/feature/srcrec-enum' into debian/sid"Michael Vogt2-26/+1
This reverts commit 1b6b123a052ca2d53e90b62da09ce300d701265a, reversing changes made to 9de6a183f09f0d0adbcc5817872c5a0024f5ef47.
2014-06-10Merge remote-tracking branch 'mvo/feature/srcrec-enum' into debian/sidMichael Vogt2-1/+26
Conflicts: debian/control
2014-06-09rename apt_pkg.SourceRecords.next() to apt_pkg.SourceRecords.step() to avoid ↵Michael Vogt1-5/+5
confusion with python iterators
2014-06-09Add apt_pkg.SourceRecords.next() to step through all SrcRecordsMichael Vogt1-0/+24
2014-04-25Add support for build profilesJohannes Schauer1-5/+6
Closes: 744243
2014-03-22python/tag.cc: Ignore missing 'encoding' attribute in file objectsJulian Andres Klode1-0/+2
In case the encoding attribute does not exist, Python sets an exception. We must thus clear the exception, otherwise it might be raised at some later point in the code.
2014-03-17Support all compressors for data.tar/control.tar (Closes: #718330)Julian Andres Klode1-27/+45
This makes our support very flexible, and open for future additions of new compression algorithms. debfile_extract_tar() is almost identical to ExtractTarMember() of apt's debDebFile.
2014-03-16python/progress.cc: Remove invalid checks for mixedCase methodsJulian Andres Klode1-6/+3
They are not working, because they set an exception if the mixedCase name is missing.
2014-03-16python/progress.cc: Fix InstallProgress to set child_pid (LP: #1177720)Julian Andres Klode1-0/+3
We do not wait for a child at all otherwise.
2014-01-27python/generic.h: Fix MkPyNumber to work if char is unsigned.Julian Andres Klode1-1/+1
We currently consider two cases "unsigned char" and "char". This works as long as "char" is signed, but this is not guaranteed. Change "char" to "signed char" instead.
2014-01-14python/pkgmanager.cc: Do not create temporary CppPyRefJulian Andres Klode1-1/+1
Instead of creating a CppPyRef with the only purpose of destroying it, just decrement the reference count. Reported-by: cppcheck
2014-01-06Unify list of comparison type values everywhereJulian Andres Klode1-1/+2
They are now ordered and include the != and < operators in all cases.
2013-10-23python/progress.cc: (scan-build): Fix some uninitialized valuesJulian Andres Klode1-3/+3
We need to set those pointers to NULL, as the functions that may write to them do not always write to them and we would read garbage in such a case.
2013-10-23python/policy.cc: (scan-build): Fix a dead assignmentJulian Andres Klode1-2/+2
We need to use else if, otherwise the first cases are not handled at all.
2013-10-23python/apt_instmodule.cc: Make RETURN(x) be return on Python 2Julian Andres Klode1-1/+1
This fixes a small compiler notice.
2013-10-23python/arfile.cc: (C++11) Explicitly cast unsigned long to time_t in {}Julian Andres Klode1-1/+2
According to gcc, the expression would be ill-formed in C++11 otherwise.
2013-10-23python/cache.cc: Remove a check for an unsigned long value < 0Julian Andres Klode1-1/+1
This is impossible.
2013-10-23python/depcache.cc: Add more error handling to PkgDepCacheCommitJulian Andres Klode1-1/+1
It returned false, but should have returned NULL after handling errors.
2013-10-23python/{depcache.cc,string.cc}: Ignore deprecation warnings for some callsJulian Andres Klode3-0/+9
Those functions are deprecated in APT, but we still need to provide them for backwards compatibility.
2013-10-23python/*.cc: Get rid of the easy-to-replace deprecated APT functionsJulian Andres Klode3-5/+7
We cannot get rid of the InstallProtect and StrToTime calls for backwards compatibility, but let's drop the others.
2013-10-21python/cache.cc: Set NoDelete=true when creating Policy, fixes segfault in ↵Julian Andres Klode1-2/+6
destructor
2013-10-15python/apt_pkgmodule.cc: Document second parameter of parse_{,src_}dependsJulian Andres Klode1-4/+8
The functions apt_pkg.parse_depends and apt_pkg.parse_src_depends take a second positional argument telling it whether to strip multi-arch strings or not.
2013-10-14python/indexrecords.cc: IndexRecords.load() needs to accept bytes as wellJulian Andres Klode1-2/+2
2013-10-08python/generic.cc: Move PyApt_Filename::init hereJulian Andres Klode2-21/+24
2013-10-08python/apt_pkgmodule.cc: Fix documentation of version_compare (Closes: #680891)Julian Andres Klode1-2/+3
This was supposed to be fixed some time ago in mvo's bzr branch but it seems that it did not survive the git migration.
2013-10-08apt_pkg: Support paths supplied as bytes objects (See: #680971)Julian Andres Klode9-26/+31
We should be done now. DO NOT MERGE
2013-10-08PyApt_Filename: Add return value to assignment operatorJulian Andres Klode1-2/+2
2013-10-08apt_inst: Support paths supplied as bytes objects (Closes: #680971)Julian Andres Klode2-30/+33
2013-10-08python/generic.h: Introduce a PyApt_Filename classJulian Andres Klode1-0/+60
On Python 3, we need to encode filenames. We could use PyUnicode_FSConverter but this introduces unneeded complexity in all callees, and is only available in Python 3.1 anyway.
2013-09-11Completely remove deprecated stuffJulian Andres Klode1-2/+0
2013-09-11Remove old API compatibility C++ support codeJulian Andres Klode17-945/+0
2013-08-31Use HAVE_OPEN_MEMSTREAMIgor Pashev3-0/+8