[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

dump tool with rpm 4.2 does not seem to work...



Hi All,

I am really trying to do a simple thing.  I am trying to get my 
very simple rpm version comparison tool (compares version of a package
to an installed package with the same name) to work again with rpm 4.2.
It seemed to compile and link just fine, but when I would try to read
the package header of an rpm file it did not work.  So I began to wonder
if perhaps the api had changed somewhat, and so I went to the tools in the
rpm source rpm and looked at dump.c.  It was using headerRead as:

	h = headerRead(fdi, HEADER_MAGIC_YES);
	if (!h) {
		fprintf(stderr, _("headerRead error: %s\n"), Fstrerror(fdi));
		exit(EXIT_FAILURE);
	}

This looked great to me as it was a simpler call than what I was using.
So I switched my code, everytime I ran it, it would print:

	headerRead error:

So I thought I must be doing something wrong, so I figured I prove to myself
that dump.c realy worked and so I built the rpm rpm.  It seemed to build fine,
but when I went to run the little dump command against the same rpm it output:

	headerRead error:

So not only is my code wrong (not so amazing (-;), but the rpm example tool dump
appears to be wrong also, or is there something I am not getting still?

FWIW, I am using phoebe 8.0.94, with rpm-4.2-0.66.  Should I be experiencing this
problem with dump, or is the example just wrong?  If the examlple (i.e. the dump.c
code) is just wrong, what is right?

Thanks...james
	





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []