Mailinglist Archive: zypp-devel (40 mails)

< Previous Next >
[zypp-devel] Found bug in RPM... should I report? Plans for RPM 4.7?
  • From: Cristian Morales Vega <cmorve69@xxxxxxxx>
  • Date: Wed, 8 Jul 2009 15:07:59 +0200
  • Message-id: <8235e6f40907080607g565bde03g4bbd722c1d4438d@xxxxxxxxxxxxxx>

I'm playing with rpmlib and it seems to me that headerRead() fails. I
could open a bug report... upstream would not accept it, and not sure
if it makes sense to open it for openSUSE. What are the plans for RPM
4.7 (or 5.x)? Will be used in 11.2?

The problem is that in this simple code headerRead always returns
NULL. Isn't easy to debug optimized code but it seems the
HEADER_MAGIC_YES detection fails (with HEADER_MAGIC_NO fails in
another header check).

#include <rpm/rpmlib.h>

int main(int argc, char ** argv) {
Header h;
FD_t fdi;

fdi = Fopen(argv[1], "r");

if (Ferror(fdi)) {
fprintf(stderr, "cannot open %s: %s\n", argv[1], Fstrerror(fdi));

h = headerRead(fdi, HEADER_MAGIC_YES);
if (!h) {
fprintf(stderr, "headerRead error: %s\n", Fstrerror(fdi));
To unsubscribe, e-mail: zypp-devel+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: zypp-devel+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups