summaryrefslogtreecommitdiff
path: root/apt/cache.py
AgeCommit message (Collapse)AuthorFilesLines
2015-06-17apt.Cache: Issue a RuntimeWarning in connect()Julian Andres Klode1-10/+19
connect() is not deprecated but is very likely to cause a massive memory and file descriptor leak until Python chooses to run its GC.
2015-06-17Break the FilteredCache <-> Cache reference cycleJulian Andres Klode1-27/+39
This should do.
2015-06-17apt.Cache: Introduce a connect2() callback connectorJulian Andres Klode1-0/+25
The new API passes the cache as the first argument to the callback and allows for other arguments to be passed as well.
2015-06-17apt.cache.FilteredCache: Fix multi-arch package lookupsJulian Andres Klode1-2/+6
This makes it slightly slower, but everyone should be happier.
2015-06-10cleanup: Fix some too long lines, and references in the documentationJulian Andres Klode1-3/+3
Gbp-Dch: ignore
2015-06-10Document that the cache now supports :all and friendsJulian Andres Klode1-0/+7
Gbp-Dch: ignore
2015-06-10apt/cache.py: Support :all and other special architecture specifiesJulian Andres Klode1-33/+34
Remove the _set and _fullnameset that previously stored the names of all packages in the cache. Checking if a package is now a matter of checking whether it is in the low-level cache and has versions (that is, is real). Still keep the _sorted_set around and make keys() manage it, and change everyone using _sorted_set for iteration to use keys().
2015-06-10apt/cache.py: Work around a cyclic reference from Cache to its methodsJulian Andres Klode1-3/+6
This makes the number of FDs stable in the test case and makes sure that our cache gets closed if it is deleted. Closes: #745487
2015-06-10Fix indentation and docstring problemsvon1-6/+6
Closes: #784910
2014-06-30make pep8 happy (again)Michael Vogt1-1/+1
2014-03-10Revert "* apt/cache.py:" (rootdir change)Julian Andres Klode1-4/+1
This reverts commit 5e76e9fccee519c63602562dc4065deb3f97748b. Conflicts: apt/cache.py debian/changelog
2014-01-06Use print_function everywhereJulian Andres Klode1-13/+15
This brings the code closer to Python 3. Automatically converted using 2to3 -f print.
2014-01-05apt/cache.py, apt/package.py: Fixed PEP8 and pyflakes issuesMichael Schaller1-28/+25
This commit removed the unused local variable 'transient' in 'apt/cache.py' and the unused import 'warnings' in 'apt/package.py'.
2013-11-23* apt/cache.py:Michael Vogt1-1/+4
- when using apt.Cache(rootdir=/some/dir) only read the APT configuration from this rootdir instead of /etc (closes: #728274)
2013-10-24apt/cache.py: Call os.path.abspath() on a supplied rootdir (LP: #792295)Julian Andres Klode1-0/+1
When the rootdir option is set to a relative path, that path appears multiple times in the dir::state::status path, as we also prepend it there.
2013-09-11Completely remove deprecated stuffJulian Andres Klode1-26/+0
2012-10-15apt/cache.py: add commentMichael Vogt1-0/+1
2012-10-15close cache on (re)openMichael Vogt1-0/+2
2012-10-04* apt/cache.py:Jason Conti1-0/+20
- Add Cache.close() to delete the records and free up file descriptors - Add with statement support for Cache.close()
2012-03-28* apt/cache.py:Michael Vogt1-2/+1
- fix _have_multi_arch flag (thanks to Sebastian Heinlein)
2011-11-22cleanup Michael Vogt1-7/+7
2011-11-22cleanup based on feedback from juliankMichael Vogt1-2/+8
2011-11-14* apt/cache.py:Michael Vogt1-0/+4
- set Dir::bin::dpkg if a alternate rootdir is given (LP: #885895)
2011-11-10* apt/cache.py:Michael Vogt1-1/+1
- remove "print" when creating dirs in apt.Cache(rootdir=dir), thanks to Martin Pitt
2011-10-19grammar fix in the cache.py doc (closes: #626610)Michael Vogt1-2/+1
2011-10-19rm usage of camelcase in cache.py doc (closes: #626617)Michael Vogt1-2/+2
2011-04-29apt.Cache: Add a _changes_count member for later useJulian Andres Klode1-0/+9
2011-04-29apt.cache: Emit change signals in ProblemResolverJulian Andres Klode1-0/+5
2011-04-12apt/cache.py: Add versionaddedJulian Andres Klode1-0/+2
2011-04-12apt.cache: Add a fetch_archives() method (Closes: #622347)Julian Andres Klode1-0/+22
2011-04-12apt.cache: Document that update() may need an open() (Closes: #622342)Julian Andres Klode1-0/+4
2011-04-06all: Fix all instances of ResourceWarning about unclosed filesJulian Andres Klode1-1/+1
2011-04-04apt/cache.py: Do not pack full names into _set, use a _fullnameset insteadJulian Andres Klode1-10/+13
This keeps the length correct, and ensures that we only iterate once over each package
2011-04-04* apt/cache.py, apt/package.py:Julian Andres Klode1-1/+7
- Add architecture property to apt.Package (LP: #703472) - Change apt.Package.name to use get_fullname(pretty=True) (LP: #740072)
2011-01-10merged lp:~geser/ubuntu/natty/python-apt/build-with-py3.2 (manually as bzr ↵Michael Vogt1-1/+1
thinks the branches have nothing in common)
2010-09-03apt/cache.py: use alternative SourceList if sources_list is usedMichael Vogt1-3/+5
2010-09-03* apt/cache.py:Michael Vogt1-1/+17
- add "sources_list" parameter to cache.update() to force updating a single sources.list entry only
2010-07-06apt/cache.py: use apt_pkg.config instead of apt_pkg.ConfigMichael Vogt1-1/+2
2010-07-02merged lp:~kiwinote/python-apt/merge-gdebi-changes, this port theMichael Vogt1-8/+16
DebPackage class fixes from gdebi into python-apt so that gdebi can use the class from python-apt directly
2010-06-29* apt/cache.py:Michael Vogt1-0/+15
- add new "dpkg_journal_dirty" property that can be used to detect a interrupted dpkg (the famous "E: dpkg was interrupted, you must manually run 'dpkg --configure -a'")
2010-06-25Merge cache.get_providers_for() into cache.get_providing_packages() and ↵Kiwinote1-46/+44
update debfile.py to use this
2010-06-25Remove unneeded cache.downloadable()Kiwinote1-10/+0
2010-06-25Merge gdebi changesKiwinote1-14/+54
2010-06-25apt/cache.py: When iterating over the cache, do so sorted by package name.Martin Pitt1-1/+11
With this we read the the package lists linearly if we need to access the package records, instead of having to do thousands of random seeks; the latter is disastrous if we use compressed package indexes, and slower than necessary for uncompressed indexes.
2010-04-21apt/cache.py: Use has_versions and has_provides from apt_pkg.Package where ↵Julian Andres Klode1-3/+3
possible.
2010-04-21apt/cache.py: Make Cache.get_providing_packages() about 1000 times faster.Julian Andres Klode1-15/+22
2010-04-21apt/cache.py: Make Cache.req_reinstall_pkgs much faster as well.Julian Andres Klode1-4/+6
2010-04-21apt/cache.py: Make Cache.get_changes() much (~35x) faster (Closes: #578074).Julian Andres Klode1-4/+8
This change consists of the following ideas: - Switch to the low-level API - Use 'not marked_keep()' to check if a package has been modified.
2010-03-23* apt/cache.py:Michael Vogt1-1/+1
- make cache open silent by default (use apt.progress.base.OpProgress)
2010-03-01Some stylistic changes.Julian Andres Klode1-3/+7