]> git.pld-linux.org Git - packages/poldek.git/blob - poldek-rpm-4.4.8.patch
b1a0539c73df0bdc47a032ad6ef9659f324103fb
[packages/poldek.git] / poldek-rpm-4.4.8.patch
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
3 +++ poldek-0.20.1-cvs20070108.22/pm/rpm/misc.c  2007-05-21 01:33:15.000000000 +0200
4 @@ -22,6 +22,8 @@
5  #include <stdint.h>
6  #include <string.h>
7  
8 +#define        _RPMPRCO_INTERNAL 1
9 +#define        _RPMDS_INTERNAL 1
10  #include <rpm/rpmlib.h>
11  #if HAVE_RPMDSRPMLIB
12  # include <rpm/rpmds.h>
13 @@ -73,6 +75,23 @@
14  
15  typedef int (*rpmcap_fn)(rpmds *ds, void *);
16  
17 +#ifdef HAVE_RPMDSSYSINFO
18 +static int pm_rpmdsSysinfo(rpmds * dsp, const char * fn) {
19 +       int ret;
20 +// XXX: better test welcome
21 +#define RPM_VERSION(a,b,c) ((a)*65536+(b)*256+(c))
22 +#if RPM_VERSION(RPM_FORMAT_VERSION,RPM_MAJOR_VERSION,RPM_MINOR_VERSION) >= RPM_VERSION(4,4,8)
23 +       rpmPRCO PRCO = rpmdsNewPRCO(NULL);
24 +       PRCO->Pdsp = dsp;
25 +       ret = rpmdsSysinfo(PRCO, fn);
26 +       PRCO->Pdsp = NULL; rpmdsFreePRCO(PRCO);
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,
This page took 0.020281 seconds and 2 git commands to generate.