diff options
| -rw-r--r-- | debian/changelog | 13 | ||||
| -rwxr-xr-x | debian/rules | 3 | ||||
| -rw-r--r-- | python/apt_pkgmodule.cc | 1 | ||||
| -rw-r--r-- | python/apt_pkgmodule.h | 1 | ||||
| -rw-r--r-- | python/depcache.cc | 70 |
5 files changed, 86 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog index a9fb92e5..08e83ae5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,16 @@ +python-apt (0.6.19ubuntu9) edgy; urgency=low + + * Reupload to restore dependency on python-central. + * debian/rules: Remove dh_python call. + + -- Matthias Klose <doko@ubuntu.com> Thu, 12 Oct 2006 14:26:46 +0200 + +python-apt (0.6.19ubuntu8) edgy; urgency=low + + * support pkgDepCache::ActionGroup() + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 6 Oct 2006 18:03:46 +0200 + python-apt (0.6.19ubuntu7) edgy; urgency=low * python/generic.h: diff --git a/debian/rules b/debian/rules index ee159b89..7299f554 100755 --- a/debian/rules +++ b/debian/rules @@ -49,12 +49,11 @@ binary-arch: build for PY in $(PYTHON); do \ /usr/bin/$$PY setup.py install --prefix=`pwd`/debian/python-apt/usr; \ done - + dh_installdocs dh_installchangelogs dh_installexamples dh_pycentral - dh_python dh_strip dh_compress dh_fixperms diff --git a/python/apt_pkgmodule.cc b/python/apt_pkgmodule.cc index 24d876af..81d16f51 100644 --- a/python/apt_pkgmodule.cc +++ b/python/apt_pkgmodule.cc @@ -431,6 +431,7 @@ static PyMethodDef methods[] = // misc {"GetPkgProblemResolver",GetPkgProblemResolver,METH_VARARGS,"GetDepProblemResolver(DepCache) -> PkgProblemResolver"}, + {"GetPkgActionGroup",GetPkgActionGroup,METH_VARARGS,"GetPkgActionGroup(DepCache) -> PkgActionGroup"}, // Cdrom {"GetCdrom",GetCdrom,METH_VARARGS,"GetCdrom() -> Cdrom"}, diff --git a/python/apt_pkgmodule.h b/python/apt_pkgmodule.h index fe7dfe88..d58f4589 100644 --- a/python/apt_pkgmodule.h +++ b/python/apt_pkgmodule.h @@ -67,6 +67,7 @@ PyObject *GetDepCache(PyObject *Self,PyObject *Args); // pkgProblemResolver extern PyTypeObject PkgProblemResolverType; PyObject *GetPkgProblemResolver(PyObject *Self, PyObject *Args); +PyObject *GetPkgActionGroup(PyObject *Self, PyObject *Args); // cdrom extern PyTypeObject PkgCdromType; diff --git a/python/depcache.cc b/python/depcache.cc index 60bbc1a4..159a7103 100644 --- a/python/depcache.cc +++ b/python/depcache.cc @@ -745,3 +745,73 @@ PyTypeObject PkgProblemResolverType = }; /*}}}*/ + +// pkgActionGroup Class /*{{{*/ +// --------------------------------------------------------------------- + + +static PyObject *PkgActionGroupRelease(PyObject *Self,PyObject *Args) +{ + pkgDepCache::ActionGroup *ag = GetCpp<pkgDepCache::ActionGroup*>(Self); + if (PyArg_ParseTuple(Args,"") == 0) + return 0; + ag->release(); + Py_INCREF(Py_None); + return HandleErrors(Py_None); +} + +static PyMethodDef PkgActionGroupMethods[] = +{ + {"release", PkgActionGroupRelease, METH_VARARGS, "release()"}, + {} +}; + + +static PyObject *ActionGroupAttr(PyObject *Self,char *Name) +{ + pkgDepCache::ActionGroup *ag = GetCpp<pkgDepCache::ActionGroup*>(Self); + + return Py_FindMethod(PkgActionGroupMethods,Self,Name); +} + + +PyTypeObject PkgActionGroupType = +{ + PyObject_HEAD_INIT(&PyType_Type) + 0, // ob_size + "pkgActionGroup", // tp_name + sizeof(CppOwnedPyObject<pkgDepCache::ActionGroup*>), // tp_basicsize + 0, // tp_itemsize + // Methods + CppOwnedDealloc<pkgDepCache::ActionGroup*>, // tp_dealloc + 0, // tp_print + ActionGroupAttr, // tp_getattr + 0, // tp_setattr + 0, // tp_compare + 0, // tp_repr + 0, // tp_as_number + 0, // tp_as_sequence + 0, // tp_as_mapping + 0, // tp_hash +}; + +PyObject *GetPkgActionGroup(PyObject *Self,PyObject *Args) +{ + PyObject *Owner; + if (PyArg_ParseTuple(Args,"O!",&PkgDepCacheType,&Owner) == 0) + return 0; + + pkgDepCache *depcache = GetCpp<pkgDepCache*>(Owner); + pkgDepCache::ActionGroup *group = new pkgDepCache::ActionGroup(*depcache); + CppOwnedPyObject<pkgDepCache::ActionGroup*> *PkgActionGroupPyObj; + PkgActionGroupPyObj = CppOwnedPyObject_NEW<pkgDepCache::ActionGroup*>(Owner, + &PkgActionGroupType, + group); + HandleErrors(PkgActionGroupPyObj); + + return PkgActionGroupPyObj; + +} + + + /*}}}*/ |
