summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06tests/test_deps.py: Remove an invalid blank lineJulian Andres Klode1-1/+0
Fixes pep8
2014-01-06apt/package.py: Fix BaseDependency.__dstr.__ne__()Julian Andres Klode2-1/+29
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 Klode4-4/+7
They are now ordered and include the != and < operators in all cases.
2014-01-06apt, doc: Fix the list of comp_type valuesJulian Andres Klode3-3/+3
Reported-by: Michael Schaller <michael@5challer.de>
2014-01-06Use a single code base for Python 2 and 3Julian Andres Klode6-25/+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 Klode13-63/+86
This brings the code closer to Python 3. Automatically converted using 2to3 -f print.
2014-01-06tests: Remove checks for Python older than 2.7Julian Andres Klode3-24/+5
This simplifies the test code a tiny bit.
2014-01-06Drop support for Python 2.6Julian Andres Klode2-11/+4
This will allow us to use more Python 3 idioms in the code, and possibly even get a single code base that works in Python 2.7 and Python 3.3 and newer.
2014-01-06debian/control: Replace a tab with spacesJulian Andres Klode1-1/+1
This looked a bit ugly if you had the wrong tab size.
2014-01-06Style fix: Do not use "is True" / "is False"Julian Andres Klode3-16/+16
This is uncommon style. It's better to use "pred" instead of "pred is True" and "not pred" instead of "pred is False".
2014-01-05make test_pep8.py passMichael Vogt48-325/+399
2014-01-05make pyflakes cleanMichael Vogt18-27/+12
2014-01-05add .travis.yml & update python3 dependency to 3.3Michael Vogt3-33/+49
This patch adds support for the travis-ci.org CI system. The "C" environment in .travis.yml is used to avoid having PPA python versions installed in the travis chroot. python3.3 is needed so that test_paths.py runs The tests_paths.py will only work with python3.3 as it uses the u"" prefix
2014-01-05add new pep8,pyflakes dependenciesMichael Vogt3-4/+6
2014-01-05add pyflakes testMichael Vogt1-0/+41
2014-01-05make pep8 test part of the unittestsMichael Vogt1-0/+27
2014-01-05apt/cache.py, apt/package.py: Fixed PEP8 and pyflakes issuesMichael Schaller3-49/+53
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 Vogt2-1/+12
- 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-23Release 0.9.1 to unstableJulian Andres Klode1-0/+19
2013-10-23po: Update the templateJulian Andres Klode1-16/+21
2013-10-23debian/python-apt-doc.links: Replace bundled underscore.js by symlinkJulian Andres Klode2-1/+2
And add a dependency in debian/control.
2013-10-23debian: Upgrade to debhelper 9 (and dpkg-buildflags)Julian Andres Klode3-4/+4
This gives us some more hardening, amongst other things.
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-23data/templates/Debian.info.in: Change wheezy version from 7.0 to 7Julian Andres Klode53-72/+72
The wheezy release now uses 7.1, 7.2 for point releases, so this is more accurate. The translations were adjusted using sed.
2013-10-23data/templates/Debian.info.in: Add jessieJulian Andres Klode1-0/+30
We already have the new Ubuntu development version, but not our own testing.
2013-10-21data/templates/Ubuntu.info.in: It's 'Tahr', not 'Thar'Julian Andres Klode1-3/+3
Stupid typo. Did I write this myself, or did I copy it from somewhere?
2013-10-21Release 0.9.0 to unstableJulian Andres Klode1-2/+2
2013-10-21debian/control: Set Standards-Version to 3.9.4Julian Andres Klode2-1/+3
2013-10-21po: Update templateJulian Andres Klode1-93/+118
2013-10-21data/templates/Ubuntu.info.in: Add "Trusty Thar"Julian Andres Klode2-0/+121
A copy from saucy, with name and numbers adjusted
2013-10-21tests/old/*.py: Update to new API as wellJulian Andres Klode12-110/+112
2013-10-21doc/examples/*.py: Update examples to the new APIJulian Andres Klode20-174/+167
Closes: #639022
2013-10-21aptsources: Correctly parse multiple options (LP: #1103200)Julian Andres Klode4-7/+39
It's still not optimal and we do not support the arch+ and arch- options, but it's a beginning.
2013-10-21doc/examples: Start updating to new APIJulian Andres Klode10-155/+156
2013-10-21doc/source/examples/dpkg-info.py: Use apt_inst.DebFileJulian Andres Klode2-2/+4
We previously used deb_extract_control, but this does not exist. Closes: #671784
2013-10-21python/cache.cc: Set NoDelete=true when creating Policy, fixes segfault in ↵Julian Andres Klode2-2/+8
destructor
2013-10-21apt/debfile.py: Pass strip_multi_arch=False to parse_depends.Julian Andres Klode6-6/+68
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-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-14utils/get_ubuntu_mirrors_from_lp.py: Switch to Python 3 againJulian Andres Klode2-2/+2
2013-10-14tests/test_path.py: Use "Dir" option instead of "RootDir", and reset in tearDownJulian Andres Klode1-3/+3
This fixes tests/test_all.py.
2013-10-14Add tests for (all except one) functions accepting pathsJulian Andres Klode1-0/+106
Test the functions with a unicode and a byte object each. I ignore PackageManager.install, because I cannot imagine an easy way to test that one.
2013-10-14python/indexrecords.cc: IndexRecords.load() needs to accept bytes as wellJulian Andres Klode2-2/+31