]>
Commit | Line | Data |
---|---|---|
e0d173aa JR |
1 | diff -ur poldek-0.30/config.h.in poldek-0.30-vrpmlog/config.h.in |
2 | --- poldek-0.30/config.h.in 2012-09-13 15:34:44.000000000 +0200 | |
3 | +++ poldek-0.30-vrpmlog/config.h.in 2012-09-17 21:07:20.000000000 +0200 | |
4 | @@ -359,6 +359,9 @@ | |
5 | /* Define to 1 if you have the `vprintf' function. */ | |
6 | #undef HAVE_VPRINTF | |
7 | ||
8 | +/* Define to 1 if you have the `vrpmlog' function. */ | |
9 | +#undef HAVE_VRPMLOG | |
10 | + | |
11 | /* Define to 1 if you have the `_rpmvercmp' function. */ | |
12 | #undef HAVE__RPMVERCMP | |
13 | ||
14 | diff -ur poldek-0.30/configure.ac poldek-0.30-vrpmlog/configure.ac | |
15 | --- poldek-0.30/configure.ac 2012-09-17 21:11:07.933745548 +0200 | |
16 | +++ poldek-0.30-vrpmlog/configure.ac 2012-09-17 21:06:52.533754558 +0200 | |
17 | @@ -343,7 +343,7 @@ | |
18 | [$DBLIB -lrpmdb]), | |
19 | [$DBLIB]) | |
20 | ||
21 | -AC_CHECK_FUNCS(rpmlog rpmCheckSig rpmVerifySignature) | |
22 | +AC_CHECK_FUNCS(rpmlog vrpmlog rpmCheckSig rpmVerifySignature) | |
23 | ||
24 | dnl rpm 4.2? | |
25 | AC_CHECK_FUNCS(rpmtsColor, [LIBS="$LIBS -lpthread" | |
26 | diff -ur poldek-0.30/pm/rpm/rpm.c poldek-0.30-vrpmlog/pm/rpm/rpm.c | |
27 | --- poldek-0.30/pm/rpm/rpm.c 2012-09-13 15:26:29.000000000 +0200 | |
28 | +++ poldek-0.30-vrpmlog/pm/rpm/rpm.c 2012-09-17 21:08:55.423750223 +0200 | |
29 | @@ -317,14 +317,20 @@ | |
30 | return dir; | |
31 | } | |
32 | ||
33 | - | |
34 | -#if defined HAVE_RPMLOG && !defined ENABLE_STATIC | |
35 | +#if !defined ENABLE_STATIC && (defined HAVE_RPMLOG || defined HAVE_VRPMLOG) | |
36 | /* XXX hack: rpmlib dumps messges to stdout only... (AFAIK) */ | |
37 | +#if defined HAVE_RPMLOG | |
38 | void rpmlog(int prii, const char *fmt, ...) __attribute__ ((visibility("default"))); | |
39 | ||
40 | -void rpmlog(int prii, const char *fmt, ...) | |
41 | +void rpmlog(int prii, const char *fmt, ...) | |
42 | { | |
43 | va_list args; | |
44 | +#elif defined HAVE_VRPMLOG | |
45 | +void vrpmlog(unsigned prii, const char *fmt, va_list args) __attribute__ ((visibility("default"))); | |
46 | + | |
47 | +void vrpmlog(unsigned prii, const char *fmt, va_list args) | |
48 | +{ | |
49 | +#endif | |
50 | int pri, mask; | |
51 | int rpmlogMask, logpri = LOGERR, verbose_level = -1; | |
52 | ||
53 | @@ -350,7 +356,9 @@ | |
54 | verbose_level = 2; | |
55 | } | |
56 | ||
57 | +#if defined HAVE_RPMLOG | |
58 | va_start(args, fmt); | |
59 | +#endif | |
60 | ||
61 | #if 0 | |
62 | printf("%d, v = %d, verbose = %d, pm_rpm_verbose = %d\n", pri, | |
63 | @@ -389,9 +397,10 @@ | |
64 | log(logpri | LOGWARN, "%s\n", p); | |
65 | } | |
66 | ||
67 | +#if defined HAVE_RPMLOG | |
68 | va_end(args); | |
69 | +#endif | |
70 | } | |
71 | - | |
72 | #endif /* HAVE_RPMLOG */ | |
73 | ||
74 | int pm_rpm_vercmp(const char *one, const char *two) |