diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-21 15:15:37 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2011-03-21 15:15:37 +0100 |
| commit | ddf4cdd43c9b7d876376a99a4cddaf8e235472d1 (patch) | |
| tree | 8debc122498868508e53f832b16e30f050b3f55c /python | |
| parent | 50cd25232b87fcf0be1a87bf2757f76a369ee175 (diff) | |
| parent | e3ebbfe848d3d03baaf969374ac55641873bb798 (diff) | |
| download | python-apt-ddf4cdd43c9b7d876376a99a4cddaf8e235472d1.tar.gz | |
* merged fix for parse_depends() in a multiarch environment
from debian/sid branch
* apt/progress/text.py:
- only run ioctl for termios.TIOCGWINSZ if the fd is a tty
* apt/debfile.py, tests/test_debfile.py:
- strip "./" from _get_content and add tests, this fixes a control
file extraction bug in gdebi
* python/depcache.cc:
- when using the actiongroup as a contextmanager incref/decref
on enter and leave. this should fix the instablity issues
that aptdaemon runs into (LP: #691134)
* debian/python3-apt.install:
- fix py3 extension module install location (thanks to
Barry)
* python/depcache.cc:
- provide bindings for new libapt SetCandidateRelease()
* debian/control:
- require new libapt-pkg-dev SetCandidateRelease()
* py3 compatible exception handline
* debian/control:
- bump minimal python version to >= 2.6
* python/apt_pkgmodule.cc:
- strip multiarch by default in RealParseDepends
- add optional parameter to allow parse_depends() to keep the
multiarch parameter
* tests/test_deps.py:
- add test forapt_pkg.parse_depends(strip_multiarch=True)
Diffstat (limited to 'python')
| -rw-r--r-- | python/apt_pkgmodule.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index cacbf77a..d1ac33e0 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -189,12 +189,14 @@ static PyObject *RealParseDepends(PyObject *Self,PyObject *Args, string Package; string Version; unsigned int Op; + bool StripMultiArch=true; const char *Start; const char *Stop; int Len; - if (PyArg_ParseTuple(Args,(char *)("s#:" + name).c_str(),&Start,&Len) == 0) + if (PyArg_ParseTuple(Args,(char *)("s#|b:" + name).c_str(), + &Start, &Len, &StripMultiArch) == 0) return 0; Stop = Start + Len; PyObject *List = PyList_New(0); @@ -205,7 +207,7 @@ static PyObject *RealParseDepends(PyObject *Self,PyObject *Args, break; Start = debListParser::ParseDepends(Start,Stop,Package,Version,Op, - ParseArchFlags); + ParseArchFlags, StripMultiArch); if (Start == 0) { PyErr_SetString(PyExc_ValueError,"Problem Parsing Dependency"); |
