summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2020-01-29 13:58:16 +0200
committerPanu Matilainen <pmatilai@redhat.com>2020-03-26 11:57:58 +0200
commit96df17cfd506ecc8646190bba65ce64e1e79baa7 (patch)
treef3069f50f52972268dba50e3ff8f3d105ca4347b
parent839946bceb4a650211c0dcf86b26ffec6c9a23cd (diff)
downloadrpm-96df17cfd506ecc8646190bba65ce64e1e79baa7.tar.gz
Fix regression on v3 package handling on database rebuild
Introduced in commit 27ea3f8624560bd158fc7bc801639310a0ffab10, the wrong header is being added in case of v3 packages. Fixes: #1017 (cherry picked from commit 85e5a70368854da0537099128530b0df69ca2216)
-rw-r--r--lib/rpmdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/rpmdb.c b/lib/rpmdb.c
index 323c4439e..355cb08cd 100644
--- a/lib/rpmdb.c
+++ b/lib/rpmdb.c
@@ -2565,7 +2565,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
/* Deleted entries are eliminated in legacy headers by copy. */
if (headerIsEntry(h, RPMTAG_HEADERIMAGE)) {
Header nh = headerReload(headerCopy(h), RPMTAG_HEADERIMAGE);
- rc = rpmdbAdd(newdb, h);
+ rc = rpmdbAdd(newdb, nh);
headerFree(nh);
} else {
rc = rpmdbAdd(newdb, h);