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 earliest 4.0 versions had what I think is a pre-version of the
immutable region in packages: HEADER_IMAGE aka RPMTAG_HEADERIMAGE,
the fully formed immutable region appears to in 4.0.2. We just dropped
the support for installing packages older than that, and we also just
made rpmdb rebuild throw out packages older than that, so we no longer
need to handle this ancient transition rite here.

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 authored and ffesti committed Sep 19, 2024
1 parent 1fbf8ae commit fd8fbb0
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 fd8fbb0

Please sign in to comment.