summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2009-06-21python: Make all CppOwnedPyObjects and similar support garbage collection.Julian Andres Klode8-70/+125
If you want to subclass apt_pkg.Cache() and create an apt_pkg.DepCache() object in it (e.g. as self.depcache) this is needed because otherwise, Python would not know about the cyclic dependency and refuse to free any of them. This also changes apt_pkg.Cache to the standard deallocation schema, because the underlying CacheFile deletes its pointers automatically on deletion. Thus a second call is not needed.
2009-06-21apt/package.py: Remove duplicated code in Version.fetch_source()Julian Andres Klode1-8/+3
2009-06-21python/acquire.cc, python/indexfile.cc: Do not delete the pointers for some ↵Julian Andres Klode2-3/+5
objects. We can not delete the AcquireFile object's pointer on deallocation because this would cause the item to be removed from the fetcher, which would be incompatible to the previous behaviour. We can not delete the IndexFile object's pointer on deallocation because it is managed by other objects like MetaIndex.
2009-06-21python: Add DeprecationWarning to functions which were replaced by classes.Julian Andres Klode10-8/+37
2009-06-21python/cache.cc: Give more information on TypeErrors in CacheMapOpJulian Andres Klode1-1/+3
2009-06-21python/progress.cc: Just try to call a function and fallback.Julian Andres Klode1-21/+7
2009-06-21python/progress.cc: Fix segfault related to pulse_items.Julian Andres Klode1-5/+5
2009-06-15po/: Big translation files cleanup.Julian Andres Klode72-61923/+13148
The previous translation files contained a lot of strings from update-manager which never were in python-apt. Those have been removed. The translations for French and Japanese have been merged with those provided in the BTS. The German translation has been updated to translate all strings.
2009-06-15data/templates/Debian.info.in: Squeeze will be Debian 6.0, not 5.1Julian Andres Klode1-1/+1
2009-06-15apt/cache.py: Provide broken_count, delete_count, install_count, keep_countJulian Andres Klode2-0/+22
properties (Closes: #532338)
2009-06-15Add support for Enhances as a dependency type (Closes: #416247)Julian Andres Klode2-1/+2
2009-06-15apt/progress/__init__.py: Check for EINTR in select (Closes: #499296)Julian Andres Klode2-2/+9
2009-06-14Merge version 0.7.10.4 from debian-sidJulian Andres Klode5-485/+361
2009-06-14apt/package.py: Return VersionList objects in Package.versions.Julian Andres Klode2-10/+87
VersionList objects provide the same features as sequences (they are even derived from collections.Sequence in Python 2.6 and newer), but also provide a mapping like interface. They are also more efficient than lists because Version objects are only created when they are accessed.
2009-06-14apt/package.py: Re-add Package.markedInstallJulian Andres Klode1-0/+1
2009-06-14python/cache.cc,depcache.cc: Do not delete the depcache and cache pointers.Julian Andres Klode2-2/+5
Deleting the pointers caused a crash because those pointers will also be deleted by closing the cache file.
2009-06-12apt/progress.py: Extract the package name from the status message (Closes: ↵Julian Andres Klode2-4/+12
#532660)
2009-06-12Bugfix: Delete pointers correctly, fixing memory leaks. (LP: #370149)Julian Andres Klode12-18/+38
We previously called the destructor of the pointer. This resulted in no object using pointers being deallocated. This patch introduces CppDeallocPtr() and CppOwnedDeallocPtr() which do the same as the other CppDealloc() and CppOwnedDealloc(), but use 'delete' on the pointer instead of the deconstructor. Furthermore, this patch also changes AcquireFile to be a CppOwnedPyObject, owned by the Acquire object. Without this change, deleting the Acquire object would cause a crash when AcquireFile is deallocated.
2009-06-09python/apt_pkgmodule.cc: Fix the modulename.Julian Andres Klode1-1/+1
2009-06-09Add apt_pkg.Policy class (Closes: #382725)Julian Andres Klode5-2/+196
2009-06-09Allow types providing __new__() to be subclassed.Julian Andres Klode13-17/+34
2009-06-09python/cache.cc: Fix segfaults using the new allocation methods.Julian Andres Klode2-3/+22
We switched to using tp_alloc() to create new objects. Some types had no tp_flags set and were not initialized using PyType_Ready, causing tp_alloc (PyType_GenericAlloc) to crash.
2009-06-09apt/package.py: Use destfile instead of dest_file.Julian Andres Klode1-2/+2
2009-06-08Fix build failures with python2.4-dbg (const)Julian Andres Klode2-3/+3
2009-06-08python/progress.cc: #include "generic.h" to fix build failure with python2.4Julian Andres Klode1-0/+1
2009-06-08python/indexrecords.cc: Swap tuple elements in lookup, and raise KeyError ↵Julian Andres Klode1-3/+8
when none is found.
2009-06-08Add apt_pkg.HashString and apt_pkg.IndexRecords (Closes: #456141)Julian Andres Klode6-1/+277
2009-06-08python/generic.h,tag.cc,configuration.cc: Use tp_alloc/tp_free instead of ↵Julian Andres Klode3-11/+12
PyObject_NEW/DEL This allows us to finally implement subclassing. Previously deletion of an instance of a subclass caused segmentation faults, this is not the case anymore.
2009-06-08merge with mvojak@debian.org5-17/+179
2009-06-08releasing version 0.7.10.4Michael Vogt2-1/+28
2009-06-07Update Debian mirrors. (Closes: #518071)Otavio Salvador2-468/+248
2009-06-07utils/get_debian_mirrors.py: updated to support current mirror page.Otavio Salvador2-6/+10
2009-06-05Set distribution to experimental.Julian Andres Klode1-2/+2
2009-06-05apt/package.py: Add Package.get_version() which returns a Version instanceJulian Andres Klode2-0/+11
for the given version string or None (Closes: #523998)
2009-06-05debian/control: Only recommend libjs-jquery (Closes: #527543).Julian Andres Klode2-4/+4
2009-06-05apt/cache.py: Introduce Cache.actiongroup()Julian Andres Klode2-1/+22
This is a short function which creates an actiongroup on the current depcache.
2009-06-05python/progress.cc, apt/progress/*.py: Use PEP 8 naming conventions for progressJulian Andres Klode4-84/+184
This changes the progress classes to use PEP 8 names. Due to the concept of the deprecation system, this causes methods of subclasses not to be called at all. If a class implements a command with underscores, it is called. If the class also implements the version in mixedCase, this is ignored. This means that all subclasses will not work correctly, because only the method from the parent class is called.
2009-06-05python/acquire.cc(AcquireItemType): Use "apt_pkg.AcquireItem" as tp_nameJulian Andres Klode1-1/+1
2009-06-05python/: Put all deprecated Get*() functions into #ifdef COMPAT_0_7.Julian Andres Klode10-9/+29
2009-06-05python/apt_pkgmodule.cc: Fix refcount problem.Julian Andres Klode1-1/+3
2009-06-05doc/source/conf.py: Force compatibility to be off when creating documentation.Julian Andres Klode1-0/+4
2009-06-05Introduce the rename rules formally, and add some exceptions.Julian Andres Klode11-46/+124
2009-06-04apt, aptsources, doc: Update to use the new names.Julian Andres Klode16-529/+531
2009-06-04python/apt_pkgmodule.cc: Make sure all types are ready.Julian Andres Klode1-18/+1
2009-06-04python/cache.cc: Remove some (char*) to make migrate-0.8.py work again.Julian Andres Klode1-13/+13
2009-06-04utils/migrate-0.8.py: Handle constants in the apt_pkg extension.Julian Andres Klode1-0/+14
2009-06-04python/: Unify naming conventions for all new names.Julian Andres Klode8-60/+60
Unify all names to follow these rules: 1. Replace the first [A-Z] with the lowercase version [a-z] 2. Replace multiple [A-Z] with [A-Z][a-z] (one upper, remaining ones lowercase) 3. Replace all remaining [A-Z] with _[a-z] This brings us from 'FileName' to 'file_name' and from 'DescURI' to 'desc_uri'. We will at a later stage add some exceptions to this rule, like 'filename' instead of 'file_name', to improve readability.
2009-06-04python/cache.cc, python/metaindex.cc: Convert remaining stuff to getset ↵Julian Andres Klode2-170/+356
descriptors.
2009-06-03python/apt_pkgmodule.cc: Rename STATE_* constants.Julian Andres Klode1-15/+15
2009-06-03utils/migrate-0.8.py: Fix function detection.Julian Andres Klode1-1/+8