[Rpm-maint] [rpm-software-management/rpm] rpm --rebuilddb depends on the optional buildtime tag and breaks if a package without it is present (Issue #2527)

Daniel Alley notifications at github.com
Tue May 30 15:56:56 UTC 2023


`RPMTAG_BUILDTIME` is considered by all documentation I've seen so far to be an optional, informational tag as opposed to a mandatory one.  However, `rpm --rebuilddb` will encounter issues if an RPM missing the buildtime tag is installed.

A "sanity check" is done on all installed packages [ensuring that they all have the name, version, release and buildtime tags set](https://github.com/rpm-software-management/rpm/blob/83413bfd3949d7a1f18f00b03333a59f77d41dc1/lib/rpmdb.c#L2474).  If any package does not have all 4, then it will be skipped over with the message `error: header #XXXX in the database is bad -- skipping`

But afterwards, the package is not listed in the database and cannot be uninstalled, but the files installed by the package are still present on disk, which seems like a potential issue with the greater `--repairdb` mechanism.

There is some other software such as `mc` that apparently breaks on packages that don't have `RPMTAG_BUILDTIME` present as well.  If there is any reason for it to be mandatory (such as being needed by `--repairdb` for some reason other than just a sanity check), then the documentation should be updated to mark it as such.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/2527
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/issues/2527 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20230530/71af2c1e/attachment-0001.html>


More information about the Rpm-maint mailing list