From 46713343fb02fe669de4ff879e1e3477746c05d1 Mon Sep 17 00:00:00 2001 From: jbj Date: Tue, 28 Aug 2001 20:33:06 +0000 Subject: [PATCH] - dependency whiteout for libgnomeprint -> gnome-print (ordering only). - dependency whiteout for nautilus -> nautilus-mozilla (ordering only). CVS patchset: 5035 CVS date: 2001/08/28 20:33:06 --- CHANGES | 1 + lib/depends.c | 5 ++++- python/rpmmodule.c | 14 ++++++++------ 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index 1ae2fec..4be3e25 100644 --- a/CHANGES +++ b/CHANGES @@ -226,6 +226,7 @@ - python: memory leaks in headerLoad/headerunload bindings. - python: retrofit sha1 digest using RPMTAG_SHA1RHN. - python: change rhnUnload bindings. + - python: teach rhnLoad about RPMTAG_SHA1RHN as well. 4.0 -> 4.0.[12] - add doxygen and lclint annotations most everywhere. diff --git a/lib/depends.c b/lib/depends.c index f667b25..92520e3 100644 --- a/lib/depends.c +++ b/lib/depends.c @@ -1629,6 +1629,9 @@ static struct badDeps_s { { "modutils", "vixie-cron" }, { "ypbind", "yp-tools" }, { "ghostscript-fonts", "ghostscript" }, + /* 7.2 only */ + { "libgnomeprint15", "gnome-print" }, + { "nautilus", "nautilus-mozilla" }, /* 7.1 only */ { "arts", "kdelibs-sound" }, /* 7.0 only */ @@ -1977,7 +1980,7 @@ rescan: /* T5. Output front of queue (T7. Remove from queue.) */ for (; q != NULL; q = q->tsi.tsi_suc) { - rpmMessage(RPMMESS_DEBUG, "%4d%4d%4d%4d %*s %s-%s-%s\n", + rpmMessage(RPMMESS_DEBUG, "%5d%5d%5d%3d %*s %s-%s-%s\n", orderingCount, q->npreds, q->tsi.tsi_qcnt, q->depth, 2*q->depth, "", q->name, q->version, q->release); diff --git a/python/rpmmodule.c b/python/rpmmodule.c index 3a98e83..901bd96 100644 --- a/python/rpmmodule.c +++ b/python/rpmmodule.c @@ -447,11 +447,10 @@ static void mungeFilelist(Header h) /** */ -static PyObject * rhnUnload(PyObject * self, PyObject * args) { +static PyObject * rhnUnload(hdrObject * s, PyObject * args) { int len; char * uh; PyObject * rc; - hdrObject *s; Header h; if (!PyArg_ParseTuple(args, "")) @@ -516,7 +515,7 @@ static struct PyMethodDef hdrMethods[] = { {"expandFilelist", (PyCFunction) hdrExpandFilelist, 1 }, {"compressFilelist", (PyCFunction) hdrCompressFilelist, 1 }, {"fullFilelist", (PyCFunction) hdrFullFilelist, 1 }, - {"rhnUnload", (PyCFunction) rhnUnload, 1 }, + {"rhnUnload", (PyCFunction) rhnUnload, METH_VARARGS }, {NULL, NULL} /* sentinel */ }; @@ -1851,12 +1850,12 @@ static PyObject * hdrLoad(PyObject * self, PyObject * args) { if (!PyArg_ParseTuple(args, "s#", &obj, &len)) return NULL; + /* malloc is needed to avoid surprises from data swab in headerLoad(). */ copy = malloc(len); if (copy == NULL) { PyErr_SetString(pyrpmError, "out of memory"); return NULL; } - memcpy (copy, obj, len); hdr = headerLoad(copy); @@ -1888,12 +1887,12 @@ static PyObject * rhnLoad(PyObject * self, PyObject * args) { if (!PyArg_ParseTuple(args, "s#", &obj, &len)) return NULL; + /* malloc is needed to avoid surprises from data swab in headerLoad(). */ copy = malloc(len); if (copy == NULL) { PyErr_SetString(pyrpmError, "out of memory"); return NULL; } - memcpy (copy, obj, len); hdr = headerLoad(copy); @@ -1903,13 +1902,16 @@ static PyObject * rhnLoad(PyObject * self, PyObject * args) { } headerAllocated(hdr); + /* XXX avoid the false OK's from rpmverifyDigest() with missing tags. */ if (!headerIsEntry(hdr, RPMTAG_HEADERIMMUTABLE)) { PyErr_SetString(pyrpmError, "bad header, not immutable"); headerFree(hdr); return NULL; } - if (!headerIsEntry(hdr, RPMTAG_SHA1HEADER)) { + /* XXX avoid the false OK's from rpmverifyDigest() with missing tags. */ + if (!headerIsEntry(hdr, RPMTAG_SHA1HEADER) + && !headerIsEntry(hdr, RPMTAG_SHA1RHN)) { PyErr_SetString(pyrpmError, "bad header, no digest"); headerFree(hdr); return NULL; -- 2.7.4