- change dir creation message from warning to debug for now.
CVS patchset: 5017
CVS date: 2001/08/16 18:49:07
- always use dl size in regionSwab() return.
- ppc: revert ppcmac to ppc.
- ppc: autoconf test for va_copy.
+ - python: add exception to detect bad data in hdrUnload.
+ - change dir creation message from warning to debug for now.
4.0 -> 4.0.[12]
- add doxygen and lclint annotations most everywhere.
st->st_mode = S_IFDIR | (fi->dperms & 07777);
rc = fsmStage(fsm, FSM_MKDIR);
if (!rc)
- rpmMessage(RPMMESS_WARNING,
+ rpmMessage(RPMMESS_DEBUG,
_("%s directory created with perms %04o.\n"),
fsm->path, (unsigned)(st->st_mode & 07777));
*te = '/';
/*@-assignexpose@*/
h->hv = *hdrVec; /* structure assignment */
/*@=assignexpose@*/
+ /*@-assignexpose -kepttrans@*/
h->blob = uh;
+ /*@=assignexpose =kepttrans@*/
h->indexAlloced = il + 1;
h->indexUsed = il;
h->index = xcalloc(h->indexAlloced, sizeof(*h->index));
char * buf;
PyObject * rc;
int len, legacy = 0;
+ Header h;
static char *kwlist[] = { "legacyHeader", NULL};
if (!PyArg_ParseTupleAndKeywords(args, keywords, "|i", kwlist, &legacy))
return NULL;
+ h = headerLink(s->h);
/* XXX this legacy switch is a hack, needs to be removed. */
if (legacy) {
- Header h;
+ h = headerCopy(s->h); /* XXX strip region tags, etc */
+ headerFree(s->h);
+ }
+ len = headerSizeof(h, 0);
+ buf = headerUnload(h);
+ h = headerFree(h);
- h = headerCopy(s->h);
- len = headerSizeof(h, 0);
- buf = headerUnload(h);
-/* XXX there's a missing headerFree(h); here */
- } else {
- len = headerSizeof(s->h, 0);
- buf = headerUnload(s->h);
+ if (buf == NULL || len == 0) {
+ PyErr_SetString(pyrpmError, "can't unload bad header\n");
+ return NULL;
}
-/* XXX there's a missing check on buf == NULL here. */
rc = PyString_FromStringAndSize(buf, len);
free(buf);
* Turn off the message for now.
*/
-/*@-redecl -exportheadervar@*/
-extern int db_hash_nelem_debug;
-/*@=redecl =exportheadervar@*/
+/*@-redecl -exportheadervar -declundef@*/
+/*@unused@*/ extern int db_hash_nelem_debug;
+/*@=redecl =exportheadervar =declundef@*/
static int db3close(/*@only@*/ dbiIndex dbi, /*@unused@*/ unsigned int flags)
/*@modifies dbi, fileSystem @*/