summaryrefslogtreecommitdiff
path: root/apt
AgeCommit message (Collapse)AuthorFilesLines
2015-06-30apt/package.py: Add rawtype property to Dependency classMichael Schaller1-4/+18
2015-06-28BaseDependency.__repr__: Replace pre_depend with rawtypeMichael Schaller1-2/+2
pre_depend only states if the relation is PreDepends, rawtype gives the relation type itself.
2015-06-21fix py3 issue with auto .gz decompression and add testMichael Vogt1-3/+3
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-10apt/debfile.py: Allow downgrading packages in check() with a parameterJulian Andres Klode1-2/+3
Well, we do not want to allow that in general. Closes: #613974
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/debfile: Stop special-casing all when looking for a package in the cacheJulian Andres Klode1-4/+0
The cache supports :all since the previous commit.
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-10Improved docstring of the Version.get_dependencies method.Michael Schaller1-1/+8
2015-06-10Fixed docstring of BaseDependency.version property.Michael Schaller1-2/+4
2015-06-10apt.package: Only reference Launchpad for missing changelogs on UbuntuJulian Andres Klode1-5/+9
The new message is not really helpful, but hey, who cares. Closes: #781270
2015-06-10apt/debfile.py: Arch-qualify in compare_to_version_in_cache()Julian Andres Klode1-0/+9
This uses the native architecture if the packages architecture is all, and the other architecture in case. We might need to consider versioned provides here, I have not looked at that yet. Closes: #750189
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-10apt/debfile.py: Fix a too long lineJulian Andres Klode1-1/+2
Gbp-Dch: ignore
2015-06-10Remove apt.progress.gtk2Julian Andres Klode2-440/+2
2015-06-10apt.debfile: Fix splitting of multi-lines Binary fields in dsc filesJulian Andres Klode1-1/+1
In a multi-line field, a comma might be followed by a newline instead of a space. Closes: #751770
2015-06-10Fix indentation and docstring problemsvon2-6/+7
Closes: #784910
2015-05-22Fix apt.Package.installed_files for multi-arch packagesMichael Vogt1-1/+1
Thanks to Michael Schaller LP: #1313699
2014-11-07apt/debfile.py: use apt_pkg.open_maybe_clear_signed_file() when opening a ↵Michael Vogt1-1/+2
.dsc file
2014-09-03fix testsMichael Vogt2-3/+5
2014-09-03read all tags from a dsc file and improve testsMichael Vogt1-6/+6
2014-09-03add support for apt.debfile.DscSrcPackage.filelistMichael Vogt1-3/+12
2014-09-02Stop reading after the "Format" stanza in a .dsc fileMichael Vogt1-0/+3
This makes the tagfile parser skip the last gpg signature part that also contains a "Version:" line.
2014-08-28tests/test_auth.py: update for gnupg 1.4.18Mauricio Faria de Oliveira1-0/+6
The test 'test_add_key_from_server_mitm' needs updating for gnupg 1.4.18 which fail differently/earlier when 'fingerprints do not match' since commit 'Screen keyserver responses' (5230304349490f31aa64ee2b69a8a2bc06bf7816) With that change gnupg actually checks itself(!) if the key that the server send matches the key that the user asked for. Closes: #755342
2014-06-30make pep8 happy (again)Michael Vogt3-16/+16
2014-04-02apt/package.py: Do not shadow _Julian Andres Klode1-3/+3
This can lead to bugs later on and makes pyflakes 0.8 cry.
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-25apt/package.py: Pass an apt_pkg.Dependency to BaseDependencyJulian Andres Klode1-19/+41
Instead of passing the properties to __init__(), let's just pass the apt_pkg.Dependency. Store that in a _dep attribute, and provide properties to provide the API. The other classes do it this way as well. Reported-by: Michael Schaller <michael@5challer.de>
2014-01-25apt/package.py: Improved readability and documentation of ↵Michael Schaller1-3/+18
BaseDependency.__dstr().
2014-01-06apt/package.py: Fix BaseDependency.__dstr.__ne__()Julian Andres Klode1-1/+1
It turns out I missed this. Just simplify it to return not self.__eq__(other). Also add a test case for it. Reported-by: Michael Schaller <michael@5challer.de>
2014-01-06Unify list of comparison type values everywhereJulian Andres Klode1-1/+1
They are now ordered and include the != and < operators in all cases.
2014-01-06apt, doc: Fix the list of comp_type valuesJulian Andres Klode1-1/+1
Reported-by: Michael Schaller <michael@5challer.de>
2014-01-06Use a single code base for Python 2 and 3Julian Andres Klode5-17/+33
This is much better than running 2to3 during the build, as it gives us more control over the Python 3 code.
2014-01-06Use print_function everywhereJulian Andres Klode11-62/+83
This brings the code closer to Python 3. Automatically converted using 2to3 -f print.
2014-01-05make test_pep8.py passMichael Vogt6-89/+129
2014-01-05make pyflakes cleanMichael Vogt4-2/+3
2014-01-05apt/cache.py, apt/package.py: Fixed PEP8 and pyflakes issuesMichael Schaller2-49/+44
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-10-21apt/debfile.py: Pass strip_multi_arch=False to parse_depends.Julian Andres Klode1-6/+8
Patch by Michael, tests derived from the ones provided by the reporter. I included the test debs without the source package, as for our use case, all needed "source code" is included in the package itself anyway. Reported-By: Francois Gouget <fgouget@free.fr> Closes: #717859 Closes: #717861
2013-10-10apt, aptsources: Only call init_config() if not already initializedJulian Andres Klode1-2/+4
Based on an idea by the bug reporter. Reported-by: Dominique Lasserre <lasserre.d@googlemail.com> Closes: #686403
2013-10-10apt/package.py: mark_upgrade misuses FromUser to set auto-installedDaniel Hartwig1-2/+3
Package.mark_upgrade uses FromUser for it's side effect of setting a package as auto-installed (or not). However, FromUser is also influential in pkgDepCache::IsModeChangeOk to determine whether an action should override a dpkg hold, etc.. Closes: #686726
2013-10-08apt/package.py: Add a Package.has_config_files property (Closes: #712749)Julian Andres Klode1-0/+5
The name might be a bit misleading, but I cannot find a short name that completely describes this check.
2013-09-11Completely remove deprecated stuffJulian Andres Klode8-725/+0
2013-06-06add support for "key in apt.debfile.DebPackage" (closes: #710541)Michael Vogt1-0/+3
2013-05-08merged from experimental and uploaded to sidMichael Vogt3-1/+27