diff options
author | Matt Wilson <msw@redhat.com> | 2000-02-11 20:28:31 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-02-11 20:28:31 +0000 |
commit | 064abb386d69ce06d7557106263e986c3d7e868e (patch) | |
tree | ebfb143195561b1f852bb9e1ed9847375a2ecd65 /rpmmodule | |
parent | 1c3a8ebe6baad8c16c7d59c326439abdf3d5ef20 (diff) | |
download | anaconda-064abb386d69ce06d7557106263e986c3d7e868e.tar.gz anaconda-064abb386d69ce06d7557106263e986c3d7e868e.tar.xz anaconda-064abb386d69ce06d7557106263e986c3d7e868e.zip |
add compress and uncompress for filelists
Diffstat (limited to 'rpmmodule')
-rw-r--r-- | rpmmodule/rpmmodule.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/rpmmodule/rpmmodule.c b/rpmmodule/rpmmodule.c index 888adc9f2..ba24c6449 100644 --- a/rpmmodule/rpmmodule.c +++ b/rpmmodule/rpmmodule.c @@ -9,6 +9,7 @@ #include "Python.h" #include "rpmlib.h" +#include "misc.h" #include "rpmmacro.h" #include "upgrade.h" @@ -39,6 +40,8 @@ static PyObject * hdrSubscript(hdrObject * s, PyObject * item); static PyObject * hdrKeyList(hdrObject * s, PyObject * args); static PyObject * hdrUnload(hdrObject * s, PyObject * args); static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args); +static PyObject * hdrCompressFilelist(hdrObject * s, PyObject * args); +static PyObject * hdrExpandFilelist(hdrObject * s, PyObject * args); void initrpm(void); static PyObject * doAddMacro(PyObject * self, PyObject * args); @@ -205,6 +208,8 @@ static struct PyMethodDef hdrMethods[] = { {"keys", (PyCFunction) hdrKeyList, 1 }, {"unload", (PyCFunction) hdrUnload, 1 }, {"verifyFile", (PyCFunction) hdrVerifyFile, 1 }, + {"expandFilelist", (PyCFunction) hdrExpandFilelist, 1 }, + {"compressFilelist", (PyCFunction) hdrCompressFilelist, 1 }, {NULL, NULL} /* sentinel */ }; @@ -1262,6 +1267,20 @@ static PyObject * hdrVerifyFile(hdrObject * s, PyObject * args) { return list; } +static PyObject * hdrCompressFilelist(hdrObject * s, PyObject * args) { + compressFilelist (s->h); + + Py_INCREF(Py_None); + return Py_None; +} + +static PyObject * hdrExpandFilelist(hdrObject * s, PyObject * args) { + expandFilelist (s->h); + + Py_INCREF(Py_None); + return Py_None; +} + static PyObject * rpmtransCreate(PyObject * self, PyObject * args) { rpmtransObject * o; rpmdbObject * db = NULL; |