rpm5 & ts.hdrFromFdno from .hdr file

Jeffrey Johnson n3npq at me.com
Mon May 20 22:09:55 CEST 2013


On May 20, 2013, at 3:50 PM, Elan Ruusamäe wrote:

> 
> 763         Py_BEGIN_ALLOW_THREADS
> 764         {   const char item[] = "Header";
> 765             const char * msg = NULL;
> 766             rpmRC rc = rpmpkgRead(item, fd, &h, &msg);
> 767             if(rc == RPMRC_NOTFOUND) {
> 768                     Py_INCREF(Py_None);
> 769     printf("notfound set to none\n");
> 770                     list = Py_None;
> 771             }

rpmpkgRead ends up in rpmdb/pkgio.c:1396 rpmReadHeader()

Wrap the above code with 
	extern int _pkgio_debug;

	...

	_pkgio_debug = -1;

	...

	_pkgio_debug = 0;

to find what is returning RPMRC_NOTFOUND. Pay attention to this comment
	/* XXX Handle EOF's as RPMRC_NOTFOUND, not RPMRC_FAIL, returns. */
because there are several causes for a RPMRC_NOTFOUND return.

hth

73 de Jeff



More information about the pld-devel-en mailing list