[packages/satyr] - completed rpm5 patch
qboosh
qboosh at pld-linux.org
Sat Apr 6 16:07:00 CEST 2013
commit 369dfdd6ae411e73776e9c4e30f4dae090f3549f
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sat Apr 6 16:07:01 2013 +0200
- completed rpm5 patch
satyr-rpm5.patch | 69 ++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 62 insertions(+), 7 deletions(-)
---
diff --git a/satyr-rpm5.patch b/satyr-rpm5.patch
index a728321..333128d 100644
--- a/satyr-rpm5.patch
+++ b/satyr-rpm5.patch
@@ -20,20 +20,23 @@
AC_CONFIG_FILES([
--- satyr-0.3/lib/rpm.c.orig 2013-03-25 15:07:04.000000000 +0100
-+++ satyr-0.3/lib/rpm.c 2013-04-06 09:53:22.452804364 +0200
-@@ -24,10 +24,8 @@
++++ satyr-0.3/lib/rpm.c 2013-04-06 15:46:04.134714198 +0200
+@@ -24,11 +24,11 @@
#include "config.h"
#include <errno.h>
#ifdef HAVE_LIBRPM
-#include <rpm/rpmlib.h>
+#include <rpm/rpmtag.h>
#include <rpm/rpmdb.h>
++#include <rpm/rpmio.h>
++#include <rpm/rpmrc.h>
#include <rpm/rpmts.h>
-#include <rpm/rpmtd.h>
-#include <rpm/header.h>
#endif
#include <fcntl.h>
-@@ -249,18 +248,18 @@
+ #include <assert.h>
+@@ -249,18 +249,18 @@
rpmTag tag,
char **result)
{
@@ -46,7 +49,7 @@
+ memset(&h, 0, sizeof(h));
+ h.tag = tag;
+ h.ix = -1;
-+ int success = headerGet(header, h, 0);
++ int success = headerGet(header, &h, 0);
if (success != 1)
return false;
@@ -59,7 +62,7 @@
return str;
}
-@@ -269,20 +268,21 @@
+@@ -269,20 +269,21 @@
rpmTag tag,
uint32_t *result)
{
@@ -72,7 +75,7 @@
+ memset(&h, 0, sizeof(h));
+ h.tag = tag;
+ h.ix = -1;
-+ int success = headerGet(header, h, 0);
++ int success = headerGet(header, &h, 0);
if (success != 1)
return false;
@@ -80,7 +83,7 @@
- uint32_t *num = rpmtdGetUint32(tag_data);
+ if (h.t != RPM_UINT32_TYPE)
+ return false;
-+ uint32_t *num = h.p.uint_32;
++ uint32_t *num = h.p.ui32p;
if (num)
*result = *num;
@@ -88,3 +91,55 @@
return num;
}
+@@ -361,14 +362,14 @@
+ }
+
+ rpmts ts = rpmtsCreate();
+- rpmdbMatchIterator iter = rpmtsInitIterator(ts,
++ rpmmi iter = rpmtsInitIterator(ts,
+ RPMTAG_NAME,
+ name,
+ strlen(name));
+
+ struct sr_rpm_package *result = NULL;
+ Header header;
+- while ((header = rpmdbNextIterator(iter)))
++ while ((header = rpmmiNext(iter)))
+ {
+ struct sr_rpm_package *package = header_to_rpm_info(header,
+ error_message);
+@@ -382,7 +383,7 @@
+ result = sr_rpm_package_append(result, package);
+ }
+
+- rpmdbFreeIterator(iter);
++ rpmmiFree(iter);
+ rpmtsFree(ts);
+ return result;
+ #else
+@@ -403,14 +404,14 @@
+ }
+
+ rpmts ts = rpmtsCreate();
+- rpmdbMatchIterator iter = rpmtsInitIterator(ts,
++ rpmmi iter = rpmtsInitIterator(ts,
+ RPMTAG_BASENAMES,
+ path,
+ strlen(path));
+
+ struct sr_rpm_package *result = NULL;
+ Header header;
+- while ((header = rpmdbNextIterator(iter)))
++ while ((header = rpmmiNext(iter)))
+ {
+ struct sr_rpm_package *package = header_to_rpm_info(header,
+ error_message);
+@@ -424,7 +425,7 @@
+ result = sr_rpm_package_append(result, package);
+ }
+
+- rpmdbFreeIterator(iter);
++ rpmmiFree(iter);
+ rpmtsFree(ts);
+ return result;
+ #else
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/satyr.git/commitdiff/369dfdd6ae411e73776e9c4e30f4dae090f3549f
More information about the pld-cvs-commit
mailing list