Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:misc
rpm-utils
rpm-utils-0.9.18-rpm.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File rpm-utils-0.9.18-rpm.patch of Package rpm-utils
diff -urp rpm-utils-0.9.18/src/Makefile rpm-utils-0.9.18-rpm/src/Makefile --- rpm-utils-0.9.18/src/Makefile 2014-01-17 16:07:05.000000000 +0200 +++ rpm-utils-0.9.18-rpm/src/Makefile 2014-08-27 17:57:38.000000000 +0300 @@ -19,7 +19,7 @@ # CPPFLAGS = $(RPM_OPT_FLAGS) -D_GNU_SOURCE -I/usr/include/rpm -LDLIBS = -lrpm -lrpmdb -lrpmio +LDLIBS = -lrpm -lrpmio LINK.o = $(CXX) $(LDFLAGS) $(TARGET_ARCH) INSTALL = install -p DESTDIR = $(RPM_BUILD_ROOT) diff -urp rpm-utils-0.9.18/src/rpmdbq.cc rpm-utils-0.9.18-rpm/src/rpmdbq.cc --- rpm-utils-0.9.18/src/rpmdbq.cc 2014-01-17 16:07:05.000000000 +0200 +++ rpm-utils-0.9.18-rpm/src/rpmdbq.cc 2014-08-27 17:51:51.000000000 +0300 @@ -25,8 +25,10 @@ #include <error.h> #include <fcntl.h> #include <climits> +#define _RPM_4_4_COMPAT #include <rpmlib.h> #include <rpmmacro.h> +#include <rpmdb.h> #include "rpmdbq.h" @@ -38,15 +40,16 @@ RPMDBQ::RPMDBQ(const char *prefix) error(EXIT_FAILURE, errno, "RPMDBQ: rpmReadConfigFiles failed"); - db = 0; - if (rpmdbOpen(prefix ? : "/", &db, O_RDONLY, 0644)) + ts = rpmtsCreate(); + rpmtsSetRootDir(ts, prefix ? prefix : "/"); + if (rpmtsOpenDB(ts, O_RDONLY)) error(EXIT_FAILURE, errno, "RPMDBQ: rpmdbOpen failed"); } RPMDBQ::~RPMDBQ() { - rpmdbClose(db); - db = 0; + rpmtsCloseDB(ts); + ts = NULL; } int @@ -66,13 +69,14 @@ RPMDBQ::run(PkgMapType & packages, const char fn[PATH_MAX]; - if (strlcpy(fn, arg, sizeof(fn)) >= sizeof(fn)) + if (strlen(arg) >= sizeof(fn)) { if (verbose) error(EXIT_SUCCESS, 0, "file name \"%s\" is too long", arg); return EXIT_FAILURE; } + strcpy(fn, arg); const char *fname = rpmCleanPath(fn); @@ -108,7 +112,7 @@ RPMDBQ::run(PkgMapType & packages, const rpmdbMatchIterator mi; - if (!(mi = rpmdbInitIterator((rpmdb) db, RPMTAG_BASENAMES, fn, 0))) + if (!(mi = rpmtsInitIterator(ts, RPMTAG_BASENAMES, fn, 0))) { if (verbose) error(EXIT_SUCCESS, 0, diff -urp rpm-utils-0.9.18/src/rpmdbq.h rpm-utils-0.9.18-rpm/src/rpmdbq.h --- rpm-utils-0.9.18/src/rpmdbq.h 2014-01-17 16:07:05.000000000 +0200 +++ rpm-utils-0.9.18-rpm/src/rpmdbq.h 2014-08-27 16:38:40.000000000 +0300 @@ -18,13 +18,12 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <rpmts.h> #include "common.h" -struct rpmdb_s; - class RPMDBQ { - struct rpmdb_s *db; + rpmts ts; public: RPMDBQ (const char *prefix); diff -urp rpm-utils-0.9.18/src/rpmrdups.cc rpm-utils-0.9.18-rpm/src/rpmrdups.cc --- rpm-utils-0.9.18/src/rpmrdups.cc 2014-01-17 16:07:05.000000000 +0200 +++ rpm-utils-0.9.18-rpm/src/rpmrdups.cc 2014-08-27 17:51:02.000000000 +0300 @@ -26,6 +26,7 @@ #include <error.h> #include <unistd.h> #include <sys/stat.h> +#define _RPM_4_4_COMPAT #include <rpmlib.h> #include <string> @@ -149,9 +150,8 @@ add_file (fpkginfo_set_map &map, const c } Header h; - int is_source; - rpmRC rpmrc = rpmReadPackageHeader(fd, &h, &is_source, 0, 0); + rpmRC rpmrc = rpmReadHeader(NULL, fd, &h, NULL); Fclose(fd); @@ -209,7 +209,7 @@ add_file (fpkginfo_set_map &map, const c const char *arch; - if (is_source) + if (headerIsSource(h)) arch = ""; else {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor