Skip to content

Commit

Permalink
Drop support for legacy region migration from rpmdb build
Browse files Browse the repository at this point in the history
The first rpm 4.0 versions had what I think is a pre-version of the
immutable region in packages: HEADER_IMAGE aka RPMTAG_HEADERIMAGE,
introduced in commit 636e4b3.
The exact history is long lost in CVS and conversion from it, but
the immutable region as we know it appears in commit
7dbc73f, so apparently in 4.0.4.

RPMTAG_HEADERIMAGE is still a part of a header's life cycle when created
from scratch and then reloaded into a contiguous region, but that stage
of the metamorphosis never comes anywhere near the rpmdb.
  • Loading branch information
pmatilai committed Sep 17, 2024
1 parent 506a1f5 commit 3e24b09
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/rpmdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2443,15 +2443,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
continue;
}

/* Deleted entries are eliminated in legacy headers by copy. */
if (headerIsEntry(h, RPMTAG_HEADERIMAGE)) {
Header nh = headerReload(headerCopy(h), RPMTAG_HEADERIMAGE);
rc = rpmdbAdd(newdb, nh);
headerFree(nh);
} else {
rc = rpmdbAdd(newdb, h);
}

rc = rpmdbAdd(newdb, h);
if (rc) {
rpmlog(RPMLOG_ERR, _("cannot add record originally at %u\n"),
rpmdbGetIteratorOffset(mi));
Expand Down

0 comments on commit 3e24b09

Please sign in to comment.