Skip to content

Commit

Permalink
Remove obscure check for package build time from --rebuilddb (rpm-sof…
Browse files Browse the repository at this point in the history
…tware-management#2527)

Back in 1997, commit be0b903 added a
sanity check for --rebuilddb operation, skipping headers which lack
some basic tags. Name, version and release are real requirements for
packages, but checking for buildtime is odd, and plain wrong.
Yes, we expect that to be present in packages built by rpm, but that's
not used for any processing and certainly is not required for a package
to be installable. And if it can be installed then it can't be
right to throw it away when rebuilding, leaving untrackable orphan
files in the process.

It is also documented as informational and optional by LSB. While
severely outdated, it is right on this account.

Fixes: rpm-software-management#2527
  • Loading branch information
pmatilai committed Jun 1, 2023
1 parent 9f568c4 commit 6caf2a5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/rpmdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -2470,8 +2470,7 @@ int rpmdbRebuild(const char * prefix, rpmts ts,
/* let's sanity check this record a bit, otherwise just skip it */
if (!(headerIsEntry(h, RPMTAG_NAME) &&
headerIsEntry(h, RPMTAG_VERSION) &&
headerIsEntry(h, RPMTAG_RELEASE) &&
headerIsEntry(h, RPMTAG_BUILDTIME)))
headerIsEntry(h, RPMTAG_RELEASE)))
{
rpmlog(RPMLOG_ERR,
_("header #%u in the database is bad -- skipping.\n"),
Expand Down

0 comments on commit 6caf2a5

Please sign in to comment.