]>
Commit | Line | Data |
---|---|---|
0c6918f0 AM |
1 | diff -urN poldek-0.20.1-cvs20070108.22.org/pm/rpm/misc.c poldek-0.20.1-cvs20070108.22/pm/rpm/misc.c |
2 | --- poldek-0.20.1-cvs20070108.22.org/pm/rpm/misc.c 2007-01-08 22:14:18.000000000 +0100 | |
ab4d1a74 AM |
3 | +++ poldek-0.20.1-cvs20070108.22/pm/rpm/misc.c 2007-05-21 08:01:00.385663226 +0200 |
4 | @@ -22,6 +22,7 @@ | |
0c6918f0 AM |
5 | #include <stdint.h> |
6 | #include <string.h> | |
7 | ||
8 | +#define _RPMPRCO_INTERNAL 1 | |
0c6918f0 AM |
9 | #include <rpm/rpmlib.h> |
10 | #if HAVE_RPMDSRPMLIB | |
11 | # include <rpm/rpmds.h> | |
ab4d1a74 | 12 | @@ -73,6 +74,24 @@ |
0c6918f0 AM |
13 | |
14 | typedef int (*rpmcap_fn)(rpmds *ds, void *); | |
15 | ||
16 | +#ifdef HAVE_RPMDSSYSINFO | |
17 | +static int pm_rpmdsSysinfo(rpmds * dsp, const char * fn) { | |
18 | + int ret; | |
19 | +// XXX: better test welcome | |
20 | +#define RPM_VERSION(a,b,c) ((a)*65536+(b)*256+(c)) | |
21 | +#if RPM_VERSION(RPM_FORMAT_VERSION,RPM_MAJOR_VERSION,RPM_MINOR_VERSION) >= RPM_VERSION(4,4,8) | |
acfa869b | 22 | + rpmPRCO PRCO = rpmdsNewPRCO(NULL); |
0c6918f0 AM |
23 | + PRCO->Pdsp = dsp; |
24 | + ret = rpmdsSysinfo(PRCO, fn); | |
ab4d1a74 AM |
25 | + PRCO->Pdsp = NULL; |
26 | + rpmdsFreePRCO(PRCO); | |
0c6918f0 AM |
27 | +#else |
28 | + ret = rpmdsSysinfo(dsp, fn); | |
29 | +#endif | |
30 | + return ret; | |
31 | +} | |
32 | +#endif | |
33 | + | |
34 | static int get_rpmlib_caps(tn_array *caps) | |
35 | { | |
36 | rpmds ds = NULL; | |
37 | @@ -86,7 +105,7 @@ | |
38 | (rpmcap_fn)rpmdsGetconf, | |
39 | #endif | |
40 | #ifdef HAVE_RPMDSSYSINFO | |
41 | - (rpmcap_fn)rpmdsSysinfo, | |
42 | + (rpmcap_fn)pm_rpmdsSysinfo, | |
43 | #endif | |
44 | #ifdef HAVE_RPMDSUNAME | |
45 | (rpmcap_fn)rpmdsUname, |