From 2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sun, 10 Sep 2023 03:05:12 +0000 Subject: automatic import of rpm --- ...ure-check-for-package-build-time-from-reb.patch | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 backport-Remove-obscure-check-for-package-build-time-from-reb.patch (limited to 'backport-Remove-obscure-check-for-package-build-time-from-reb.patch') diff --git a/backport-Remove-obscure-check-for-package-build-time-from-reb.patch b/backport-Remove-obscure-check-for-package-build-time-from-reb.patch new file mode 100644 index 0000000..2bd4c62 --- /dev/null +++ b/backport-Remove-obscure-check-for-package-build-time-from-reb.patch @@ -0,0 +1,41 @@ +From 6caf2a5f586838f6188dd6667a4df6d9c6ec0163 Mon Sep 17 00:00:00 2001 +From: Panu Matilainen +Date: Thu, 1 Jun 2023 09:45:01 +0300 +Subject: [PATCH] Remove obscure check for package build time from --rebuilddb + (#2527) + +Back in 1997, commit be0b90359bcd8156385178eb9b570c0538c0333f 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: #2527 +--- + lib/rpmdb.c | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +diff --git a/lib/rpmdb.c b/lib/rpmdb.c +index b51e9f09e..361f04150 100644 +--- a/lib/rpmdb.c ++++ b/lib/rpmdb.c +@@ -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"), +-- +2.27.0 + -- cgit v1.2.3