1 Star 0 Fork 80

houlifei/rpm

forked from src-openEuler/rpm 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
backport-Remove-obscure-check-for-package-build-time-from-reb.patch 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
renxichen 提交于 2023-08-02 16:25 . backport some patches from upstream
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/houlifei_uniontech/rpm.git
git@gitee.com:houlifei_uniontech/rpm.git
houlifei_uniontech
rpm
rpm
master

搜索帮助