Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
python-rpm.26687
disable-bdb.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File disable-bdb.diff of Package python-rpm.26687
--- ./Makefile.am.orig 2021-04-21 13:03:04.917924372 +0000 +++ ./Makefile.am 2021-04-21 13:03:28.145883412 +0000 @@ -3,7 +3,6 @@ ACLOCAL_AMFLAGS = -I m4 DISTCHECK_CONFIGURE_FLAGS = \ - --with-external-db \ --enable-python \ --enable-bdb \ --enable-ndb \ --- ./configure.ac.orig 2021-04-21 13:03:00.861931524 +0000 +++ ./configure.ac 2021-04-21 13:03:04.917924372 +0000 @@ -514,6 +514,16 @@ AM_CONDITIONAL(LIBDW,[test "$WITH_LIBDW" AM_CONDITIONAL(HAVE_LIBDW_STRTAB,[test "$HAVE_LIBDW_STRTAB" = yes]) #================= +# Check for BDB support +AC_ARG_ENABLE([bdb], + [AS_HELP_STRING([--enable-bdb=@<:@yes/no/auto@:>@], + [build with Berkeley DB rpm database format support (default=yes)])], + [enable_bdb="$enableval"], + [enable_bdb=yes]) +have_bdb=no +AS_IF([test "x$enable_bdb" != "xno"], [ + + # Process --with/without-external-db AC_ARG_WITH(external_db, [AS_HELP_STRING([--with-external-db],[build against an external Berkeley db])], [case "$with_external_db" in @@ -538,12 +548,14 @@ yes ) ],[ AC_MSG_ERROR([missing required header db.h]) ]) + have_bdb=yes ;; no|maybe ) # Try internal database first, then fall back to external # unless --without-external-db (no) was explicitly given. if [ test -x db/dist/configure ]; then AC_DEFINE(HAVE_DB_H, 1, [Define if you have the <db3/db.h> header file]) + have_bdb=internal else case "$with_external_db" in maybe) @@ -566,11 +578,20 @@ no|maybe ) AC_MSG_ERROR([internal Berkeley DB directory not present, see INSTALL]) ;; esac + have_bdb=yes fi ;; esac - +AC_DEFINE([WITH_BDB], [1], [Define if BDB is available]) AC_SUBST([WITH_DB_LIB]) +]) + +AM_CONDITIONAL([BDB], [test "x$have_bdb" != "xno"]) +AM_CONDITIONAL([WITH_INTERNAL_DB],[test "x$have_bdb" = "xinternal"]) +if test "x$have_bdb" = "xinternal"; then + AC_CONFIG_SUBDIRS(db3) +fi + #================= # Process --enable-ndb @@ -1065,11 +1086,6 @@ AC_SUBST(RPMCONFIGDIR) AC_SUBST(OBJDUMP) -if test "$with_external_db" = no; then - AC_CONFIG_SUBDIRS(db3) -fi - -AM_CONDITIONAL([WITH_INTERNAL_DB],[test "$with_external_db" = no]) AM_CONDITIONAL([DOXYGEN],[test "$DOXYGEN" != no]) AM_CONDITIONAL([HACKINGDOCS],[test "$with_hackingdocs" = yes]) --- ./lib/Makefile.am.orig 2020-04-28 12:50:11.811398981 +0000 +++ ./lib/Makefile.am 2021-04-21 13:03:04.917924372 +0000 @@ -24,7 +24,7 @@ EXTRA_PROGRAMS = usrlib_LTLIBRARIES = librpm.la librpm_la_SOURCES = \ - backend/db3.c backend/dbi.c backend/dbi.h \ + backend/dbi.c backend/dbi.h \ backend/dbiset.c backend/dbiset.h \ headerutil.c header.c headerfmt.c header_internal.h \ rpmdb.c rpmdb_internal.h \ @@ -59,11 +59,14 @@ librpm_la_LIBADD += @LUA_LIBS@ librpm_la_SOURCES += rpmliblua.c rpmliblua.h endif +if BDB if WITH_INTERNAL_DB +librpm_la_SOURCES += backend/db3.c librpm_la_LIBADD += $(libdb_la) else librpm_la_LIBADD += @WITH_DB_LIB@ endif +endif if NDB librpm_la_SOURCES += \ --- ./lib/backend/dbi.c.orig 2020-04-28 12:50:11.811398981 +0000 +++ ./lib/backend/dbi.c 2021-04-21 13:03:04.917924372 +0000 @@ -49,12 +49,32 @@ dbDetectBackend(rpmdb rdb) rdb->db_ops = &ndb_dbops; } else #endif - { +#if defined(WITH_BDB) + if (!strcmp(db_backend, "bdb")) { rdb->db_ops = &db3_dbops; - if (*db_backend == '\0') { + } else +#endif + { + if (db_backend) free(db_backend); +#if defined(WITH_BDB) + if (!rdb->db_ops) { + rdb->db_ops = &db3_dbops; db_backend = xstrdup("bdb"); } +#endif +#ifdef ENABLE_NDB + if (!rdb->db_ops) { + rdb->db_ops = &ndb_dbops; + db_backend = xstrdup("ndb"); + } +#endif +#if defined(WITH_LMDB) + if (!rdb->db_ops) { + rdb->db_ops = &lmdb_dbops; + db_backend = xstrdup("lmdb"); + } +#endif } #if defined(WITH_LMDB) @@ -75,12 +95,14 @@ dbDetectBackend(rpmdb rdb) free(path); #endif +#if defined(WITH_BDB) path = rstrscat(NULL, dbhome, "/Packages", NULL); if (access(path, F_OK) == 0 && rdb->db_ops != &db3_dbops) { rdb->db_ops = &db3_dbops; rpmlog(RPMLOG_WARNING, _("Found BDB Packages database while attempting %s backend: using bdb backend.\n"), db_backend); } free(path); +#endif if (db_backend) free(db_backend); --- ./lib/backend/dbi.h.orig 2021-04-21 13:03:00.845931553 +0000 +++ ./lib/backend/dbi.h 2021-04-21 13:03:04.917924372 +0000 @@ -265,8 +265,10 @@ struct rpmdbOps_s { const void * (*idxdbKey)(dbiIndex dbi, dbiCursor dbc, unsigned int *keylen); }; +#if defined(WITH_BDB) RPM_GNUC_INTERNAL extern struct rpmdbOps_s db3_dbops; +#endif #ifdef ENABLE_NDB RPM_GNUC_INTERNAL
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