]> git.pld-linux.org Git - packages/abrt.git/blame - abrt-rpm45.patch
- up to 2.1.3
[packages/abrt.git] / abrt-rpm45.patch
CommitLineData
d3f5b5cc
JB
1--- abrt-2.0.8/src/daemon/Makefile.am.0011~ 2011-12-15 13:39:13.000000000 +0100
2+++ abrt-2.0.8/src/daemon/Makefile.am 2012-03-11 21:28:24.900043460 +0100
3@@ -84,6 +84,7 @@ abrt_action_save_package_data_CPPFLAGS =
4 -I$(srcdir)/../include \
5 -I$(srcdir)/../lib \
6 -DCONF_DIR=\"$(CONF_DIR)\" \
7+ $(RPM_CFLAGS) \
8 $(GLIB_CFLAGS) \
9 $(LIBREPORT_CFLAGS) \
10 -D_GNU_SOURCE \
11--- abrt-2.1.3/src/daemon/rpm.h.orig 2013-03-13 10:00:17.000000000 +0100
12+++ abrt-2.1.3/src/daemon/rpm.h 2013-04-02 18:02:06.019396313 +0200
13@@ -22,6 +22,7 @@
14 #ifndef RPM_H_
15 #define RPM_H_
16
17+#include "rpmlib.h"
18 #include <rpm/rpmts.h>
19 #include <rpm/rpmcli.h>
20 #include <rpm/rpmdb.h>
21--- abrt-2.1.3/src/daemon/rpm.c.orig 2013-03-13 10:00:17.000000000 +0100
22+++ abrt-2.1.3/src/daemon/rpm.c 2013-04-02 18:09:54.892719865 +0200
23@@ -62,7 +62,6 @@ void rpm_init()
24 void rpm_destroy()
25 {
26 rpmFreeRpmrc();
27- rpmFreeCrypto();
28 rpmFreeMacros(NULL);
29
30 list_free_with_free(list_fingerprints);
31@@ -103,7 +102,14 @@ int rpm_chk_fingerprint(const char* pkg)
32 if (!header)
33 goto error;
34
35- pgpsig = headerFormat(header, "%|SIGGPG?{%{SIGGPG:pgpsig}}:{%{SIGPGP:pgpsig}}|", &errmsg);
36+ pgpsig = headerSprintf(
37+ header,
38+ "%|DSAHEADER?{%{DSAHEADER:pgpsig}}:{%|RSAHEADER?{%{RSAHEADER:pgpsig}}:"
39+ "{%|SIGGPG?{%{SIGGPG:pgpsig}}:{%|SIGPGP?{%{SIGPGP:pgpsig}}:{(none)}|}|}|}|",
40+ NULL,
41+ NULL,
42+ &errmsg);
43+
44 if (!pgpsig && errmsg)
45 {
46 VERB1 log("cannot get siggpg:pgpsig. reason: %s", errmsg);
47@@ -195,14 +201,13 @@ char* rpm_get_component(const char *file
48 rpmdbFreeIterator(iter);
49 rpmtsFree(ts);
50 ts = rpmtsCreate();
51- if (rpmtsSetRootDir(ts, rootdir_or_NULL) != 0)
52- goto error1;
53+ rpmtsSetRootDir(ts, rootdir_or_NULL);
54 filename += len;
55 rootdir_or_NULL = NULL;
56 }
57
58 const char *errmsg = NULL;
59- srpm = headerFormat(header, "%{SOURCERPM}", &errmsg);
60+ srpm = headerSprintf(header, "%{SOURCERPM}", NULL, NULL, &errmsg);
61 if (!srpm && errmsg)
62 {
63 error_msg("cannot get srpm. reason: %s", errmsg);
64@@ -223,7 +228,7 @@ char* rpm_get_component(const char *file
65 static inline int pkg_add_##name(Header header, struct pkg_envra *p) \
66 { \
67 const char *errmsg = NULL; \
68- p->p_##name = headerFormat(header, "%{"#name"}", &errmsg); \
69+ p->p_##name = headerSprintf(header, "%{"#name"}", NULL, NULL, &errmsg); \
70 if (p->p_##name || !errmsg) \
71 return 0; \
72 \
73@@ -268,8 +273,7 @@ struct pkg_envra *rpm_get_package_nvr(co
74 rpmdbFreeIterator(iter);
75 rpmtsFree(ts);
76 ts = rpmtsCreate();
77- if (rpmtsSetRootDir(ts, rootdir_or_NULL) != 0)
78- goto error1;
79+ rpmtsSetRootDir(ts, rootdir_or_NULL);
80 filename += len;
81 rootdir_or_NULL = NULL;
82 }
83--- abrt-2.1.3/src/plugins/bodhi.c.orig 2013-03-13 10:00:17.000000000 +0100
84+++ abrt-2.1.3/src/plugins/bodhi.c 2013-04-02 18:15:58.076045639 +0200
85@@ -18,6 +18,8 @@
86 */
87
88 #include <json/json.h>
89+#include <stdint.h>
90+#include <rpmlib.h>
91 #include <rpm/rpmts.h>
92 #include <rpm/rpmcli.h>
93 #include <rpm/rpmdb.h>
94@@ -338,7 +340,7 @@ static char *rpm_get_nvr_by_pkg_name(con
95 goto error;
96
97 const char *errmsg = NULL;
98- nvr = headerFormat(header, "%{name}-%{version}-%{release}", &errmsg);
99+ nvr = headerSprintf(header, "%{name}-%{version}-%{release}", NULL, NULL, &errmsg);
100
101 if (!nvr && errmsg)
102 error_msg("cannot get nvr. reason: %s", errmsg);
103@@ -348,7 +350,6 @@ error:
104 rpmtsFree(ts);
105
106 rpmFreeRpmrc();
107- rpmFreeCrypto();
108 rpmFreeMacros(NULL);
109
110 return nvr;
This page took 0.052874 seconds and 4 git commands to generate.