Description of Problem: | $ cat dt.c | #include <rpm/rpmlib.h> | #include <rpm/rpmts.h> | $ gcc -I/usr/include/rpm dt.c | In file included from dt.c:2: | /usr/include/rpm/rpmts.h:9:44: rpmhash.h: No such file or directory | /usr/include/rpm/rpmts.h:10:69: rpmal.h: No such file or directory | In file included from dt.c:2: | /usr/include/rpm/rpmts.h:196: parse error before "rpmps" | /usr/include/rpm/rpmts.h:298: parse error before "rpmtsProblems" There are two problems: - rpmhash.h and rpmal.h are not installed by rpm-devel. - rpmts.h (and rpmds.h also) requires a previous '#include <rpm/rpmps.h>' and <rpm/rpmlib.h>. It should be usable standalone also. Version-Release number of selected component (if applicable): rpm-4.1-0.45
Installed rpmal.h and rpmhash.h in /usr/include/rpm for now. I'm not very comfortable exposing either, particularly since only a typedef is needed somewhere. What's tricky and annoying is trying to get a clean break between rpmdb and lib functionality, the two are still a bit snarled. I'll look at adding rpmps.h to rpmlib.h or rpmts.h, but I don't believe that rpmts.h/rpmds.h are useful as standalone includes. For now include rpmps.h as appropriate.