SHA256
3
0
forked from pool/rpm
Michael Schröder 2020-10-07 13:58:13 +00:00 committed by Git OBS Bridge
parent 7308cdbed4
commit b0729a41e7

View File

@ -1,5 +1,5 @@
--- ./lib/backend/bdb_ro.c.orig 2020-05-28 10:04:25.027136631 +0000
+++ ./lib/backend/bdb_ro.c 2020-09-30 13:37:58.754734096 +0000
+++ ./lib/backend/bdb_ro.c 2020-10-07 13:57:21.021813205 +0000
@@ -790,6 +790,7 @@ static unsigned int bdbro_pkgdbKey(dbiIn
struct rpmdbOps_s bdbro_dbops = {
.name = "bdb_ro",
@ -9,7 +9,7 @@
.open = bdbro_Open,
.close = bdbro_Close,
--- ./lib/backend/dbi.c.orig 2020-08-31 09:14:07.991087349 +0000
+++ ./lib/backend/dbi.c 2020-09-30 13:39:51.026491390 +0000
+++ ./lib/backend/dbi.c 2020-10-07 13:57:21.021813205 +0000
@@ -119,11 +119,20 @@ exit:
}
@ -31,8 +31,8 @@
const char * dbiName(dbiIndex dbi)
{
return dbi->dbi_file;
--- ./lib/backend/dbi.h.orig 2020-09-30 13:37:56.206739602 +0000
+++ ./lib/backend/dbi.h 2020-09-30 13:37:58.754734096 +0000
--- ./lib/backend/dbi.h.orig 2020-10-07 13:57:12.145839232 +0000
+++ ./lib/backend/dbi.h 2020-10-07 13:57:21.021813205 +0000
@@ -11,6 +11,7 @@ enum rpmdbFlags {
RPMDB_FLAG_REBUILD = (1 << 1),
RPMDB_FLAG_VERIFYONLY = (1 << 2),
@ -72,16 +72,14 @@
int (*open)(rpmdb rdb, rpmDbiTagVal rpmtag, dbiIndex * dbip, int flags);
int (*close)(dbiIndex dbi, unsigned int flags);
--- ./lib/rpmdb.c.orig 2020-09-30 13:37:56.206739602 +0000
+++ ./lib/rpmdb.c 2020-09-30 13:37:58.758734086 +0000
@@ -516,7 +516,15 @@ static int openDatabase(const char * pre
--- ./lib/rpmdb.c.orig 2020-10-07 13:57:12.145839232 +0000
+++ ./lib/rpmdb.c 2020-10-07 13:57:37.609764566 +0000
@@ -516,7 +516,13 @@ static int openDatabase(const char * pre
rpmsqActivate(1);
}
- rc = doOpen(db, justPkgs);
+ if (!db->db_pkgs && !justCheck && (mode & O_ACCMODE) == O_RDWR && dbiNeedConversion(db)) {
+ rpmlog(RPMLOG_WARNING, _("Converting database from %s to %s format\n"), db->db_ops->name, db->db_ops_config->name);
+
+ rc = rpmdbRebuild(prefix, NULL, NULL, RPMDB_REBUILD_FLAG_CONVERT);
+ db->db_ops = NULL; /* force re-detection of backend */
+ }
@ -91,7 +89,7 @@
if (!db->db_descr)
db->db_descr = "unknown db";
@@ -2311,6 +2319,15 @@ int rpmdbAdd(rpmdb db, Header h)
@@ -2311,6 +2317,15 @@ int rpmdbAdd(rpmdb db, Header h)
if (db == NULL)
return 0;
@ -107,7 +105,7 @@
hdrBlob = headerExport(h, &hdrLen);
if (hdrBlob == NULL || hdrLen == 0) {
ret = -1;
@@ -2506,7 +2523,22 @@ int rpmdbRebuild(const char * prefix, rp
@@ -2506,7 +2521,22 @@ int rpmdbRebuild(const char * prefix, rp
}
rootdbpath = rpmGetPath(prefix, dbpath, NULL);
@ -131,7 +129,7 @@
if (rstreq(newdbpath, "") || rstreq(newdbpath, dbpath)) {
newdbpath = _free(newdbpath);
rasprintf(&newdbpath, "%srebuilddb.%d", dbpath, (int) getpid());
@@ -2532,7 +2564,9 @@ int rpmdbRebuild(const char * prefix, rp
@@ -2532,7 +2562,9 @@ int rpmdbRebuild(const char * prefix, rp
goto exit;
}
if (openDatabase(prefix, newdbpath, &newdb,
@ -143,7 +141,7 @@
goto exit;
}
--- ./lib/rpmdb_internal.h.orig 2020-05-28 10:04:25.037136686 +0000
+++ ./lib/rpmdb_internal.h 2020-09-30 13:37:58.758734086 +0000
+++ ./lib/rpmdb_internal.h 2020-10-07 13:57:21.021813205 +0000
@@ -25,6 +25,7 @@ extern "C" {
enum rpmdbRebuildFlags_e {