]> git.pld-linux.org Git - packages/satyr.git/blame - satyr-rpm45.patch
- updated to 0.15
[packages/satyr.git] / satyr-rpm45.patch
CommitLineData
60422b1d
JB
1--- satyr-0.15/lib/Makefile.am.orig 2014-01-07 17:07:58.000000000 +0100
2+++ satyr-0.15/lib/Makefile.am 2014-02-02 20:51:35.551284308 +0100
e90cc048 3@@ -62,7 +62,7 @@
ad566da7
JB
4 unstrip.c \
5 utils.c
6
60422b1d
JB
7-libsatyr_conv_la_CFLAGS = -Wall -Wformat=2 -std=gnu99 -D_GNU_SOURCE -I$(top_srcdir)/include $(GLIB_CFLAGS)
8+libsatyr_conv_la_CFLAGS = -Wall -Wformat=2 -std=gnu99 -D_GNU_SOURCE -I$(top_srcdir)/include $(GLIB_CFLAGS) $(RPM_CFLAGS)
e90cc048 9 libsatyr_conv_la_LDFLAGS = $(GLIB_LIBS)
ad566da7
JB
10
11 if HAVE_LIBOPCODES
12--- satyr-0.3/configure.ac.orig 2013-04-05 19:30:55.747216259 +0200
13+++ satyr-0.3/configure.ac 2013-04-05 19:35:07.100544357 +0200
14@@ -63,6 +63,7 @@
15 AC_CHECK_LIB([unwind-coredump], [main])
16
17 # rpm
18+PKG_CHECK_MODULES([RPM], [rpm])
19 AC_CHECK_LIB([rpm], [main])
20
21 AC_CONFIG_FILES([
22--- satyr-0.3/lib/rpm.c.orig 2013-03-25 15:07:04.000000000 +0100
23+++ satyr-0.3/lib/rpm.c 2013-04-06 10:59:35.792721546 +0200
24@@ -27,7 +27,6 @@
25 #include <rpm/rpmlib.h>
26 #include <rpm/rpmdb.h>
27 #include <rpm/rpmts.h>
28-#include <rpm/rpmtd.h>
29 #include <rpm/header.h>
30 #endif
31 #include <fcntl.h>
32@@ -249,18 +248,20 @@
33 rpmTag tag,
34 char **result)
35 {
36- rpmtd tag_data = rpmtdNew();
37- int success = headerGet(header,
38- tag,
39- tag_data,
40- HEADERGET_DEFAULT);
41+
42+ int_32 type, cnt;
43+ void *p;
44+ const char **strp;
45+ int success = headerGetEntry(header, tag, &type, &p, &cnt);
46
47 if (success != 1)
48 return false;
49
50- const char *str = rpmtdGetString(tag_data);
51+ const char *str = (type == RPM_STRING_TYPE) ? p :
52+ (((type == RPM_STRING_ARRAY_TYPE) || (type == RPM_I18NSTRING_TYPE)) ? *(strp = p) : NULL);
53 *result = (str ? sr_strdup(str) : NULL);
54- rpmtdFree(tag_data);
55+ if(type == RPM_STRING_ARRAY_TYPE)
56+ free(p);
57 return str;
58 }
59
60@@ -269,20 +270,19 @@
61 rpmTag tag,
62 uint32_t *result)
63 {
64- rpmtd tag_data = rpmtdNew();
65- int success = headerGet(header,
66- tag,
67- tag_data,
68- HEADERGET_DEFAULT);
69+ int_32 type, cnt;
70+ void *p;
71+ int success = headerGetEntry(header, tag, &type, &p, &cnt);
72
73 if (success != 1)
74 return false;
75
76- uint32_t *num = rpmtdGetUint32(tag_data);
77+ if (type != RPM_UINT32_TYPE)
78+ return false;
79+ uint32_t *num = p;
80 if (num)
81 *result = *num;
82
83- rpmtdFree(tag_data);
84 return num;
85 }
86
This page took 0.03547 seconds and 4 git commands to generate.