summaryrefslogtreecommitdiff
path: root/backport-Remove-obscure-check-for-package-build-time-from-reb.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-09-10 03:05:12 +0000
committerCoprDistGit <infra@openeuler.org>2023-09-10 03:05:12 +0000
commit2bc2b430bc4c1a9a0bfd1c01da68bd53bf7da052 (patch)
treea2af4fd609c7decacbf0ea11926ea338596fb179 /backport-Remove-obscure-check-for-package-build-time-from-reb.patch
parent0ae9f87336a3d78d8fbc0a1e5c75cba5f9cf8597 (diff)
automatic import of rpm
Diffstat (limited to 'backport-Remove-obscure-check-for-package-build-time-from-reb.patch')
-rw-r--r--backport-Remove-obscure-check-for-package-build-time-from-reb.patch41
1 files changed, 41 insertions, 0 deletions
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 <pmatilai@redhat.com>
+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
+