diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2008-11-10 11:37:22 +0100 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2008-11-10 11:37:22 +0100 |
| commit | 2ffb67326afc5a404e14e4fa1cb57f341e9fea94 (patch) | |
| tree | cd3dcc8c3e164b65f4b23e43b90ed225d829b1ac /python | |
| parent | 01582092da5613022a4ef43751f38306957c7480 (diff) | |
| parent | 969986c30b34fc47b47a9ca2c9e1cd6ab38fe5ea (diff) | |
| download | python-apt-2ffb67326afc5a404e14e4fa1cb57f341e9fea94.tar.gz | |
* python/metaindex.cc
- fix crash when incorrect attribute is given
* data/templates/Ubuntu.info.in:
- updated to fix ports.ubuntu.com for powerpc and lpia
(LP: #220890)
* aptsources/distro.py:
- add parameter to get_distro() to make unit testing easier
* tests/test_aptsources_ports.py:
- add test for arch specific handling (when sub arch is on
a different mirror than "main" arches)
* python/acquire.cc (GetPkgAcqFile): Support DestDir and DestFilename.
Diffstat (limited to 'python')
| -rw-r--r-- | python/acquire.cc | 12 | ||||
| -rw-r--r-- | python/apt_pkgmodule.cc | 2 | ||||
| -rw-r--r-- | python/apt_pkgmodule.h | 1 |
3 files changed, 10 insertions, 5 deletions
diff --git a/python/acquire.cc b/python/acquire.cc index 65f8f2d7..9cf84928 100644 --- a/python/acquire.cc +++ b/python/acquire.cc @@ -242,6 +242,8 @@ PyTypeObject PkgAcquireFileType = 0, // tp_hash }; +char *doc_GetPkgAcqFile = +"GetPkgAcqFile(pkgAquire, uri[, md5, size, descr, shortDescr, destDir, destFile]) -> PkgAcqFile\n"; PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject * kwds) { PyObject *pyfetcher; @@ -250,11 +252,11 @@ PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject * kwds) uri = md5 = descr = shortDescr = destDir = destFile = ""; char * kwlist[] = {"owner","uri", "md5", "size", "descr", "shortDescr", - NULL}; + "destDir", "destFile", NULL}; - if (PyArg_ParseTupleAndKeywords(Args, kwds, "O!s|siss", kwlist, + if (PyArg_ParseTupleAndKeywords(Args, kwds, "O!s|sissss", kwlist, &PkgAcquireType, &pyfetcher, &uri, &md5, - &size, &descr, &shortDescr) == 0) + &size, &descr, &shortDescr, &destDir, &destFile) == 0) return 0; pkgAcquire *fetcher = GetCpp<pkgAcquire*>(pyfetcher); @@ -263,7 +265,9 @@ PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject * kwds) md5, // md5 size, // size descr, // descr - shortDescr); // short-desc + shortDescr, + destDir, + destFile); // short-desc CppPyObject<pkgAcqFile*> *AcqFileObj = CppPyObject_NEW<pkgAcqFile*>(&PkgAcquireFileType); AcqFileObj->Object = af; diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index fae85f00..7b13c838 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -447,7 +447,7 @@ static PyMethodDef methods[] = // Acquire {"GetAcquire",GetAcquire,METH_VARARGS,"GetAcquire() -> Acquire"}, - {"GetPkgAcqFile",(PyCFunction)GetPkgAcqFile,METH_KEYWORDS|METH_VARARGS,"GetPkgAcquireFile() -> pkgAcquireFile"}, + {"GetPkgAcqFile",(PyCFunction)GetPkgAcqFile,METH_KEYWORDS|METH_VARARGS, doc_GetPkgAcqFile}, // PkgManager {"GetPackageManager",GetPkgManager,METH_VARARGS,"GetPackageManager(DepCache) -> PackageManager"}, diff --git a/python/apt_pkgmodule.h b/python/apt_pkgmodule.h index f59c8ca0..6e02d8e3 100644 --- a/python/apt_pkgmodule.h +++ b/python/apt_pkgmodule.h @@ -75,6 +75,7 @@ PyObject *GetCdrom(PyObject *Self,PyObject *Args); // acquire extern PyTypeObject PkgAcquireType; +extern char *doc_GetPkgAcqFile; PyObject *GetAcquire(PyObject *Self,PyObject *Args); PyObject *GetPkgAcqFile(PyObject *Self, PyObject *Args, PyObject *kwds); |
