rpm/0009-Check-rpm-parser.patch
gaoyusong b8562822b3 Add digest list plugin support
Signed-off-by: gaoyusong <gaoyusong2@huawei.com>
2023-02-08 11:04:17 +08:00

30 lines
913 B
Diff

From 218a3e2bca1c48b4338939cf01941e5231513300 Mon Sep 17 00:00:00 2001
From: Roberto Sassu <roberto.sassu@huawei.com>
Date: Wed, 10 Mar 2021 12:23:32 +0100
Subject: [PATCH 09/13] Check rpm parser
---
plugins/digest_list.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/plugins/digest_list.c b/plugins/digest_list.c
index 4142caf..ca77282 100644
--- a/plugins/digest_list.c
+++ b/plugins/digest_list.c
@@ -133,6 +133,12 @@ static int upload_digest_list(char *path, int type, int digest_list_signed)
/* If the digest list is not signed, execute the RPM parser */
if (!digest_list_signed) {
+ if (stat(RPM_PARSER, &st) == -1) {
+ rpmlog(RPMLOG_DEBUG, "digest_list: %s not found, "
+ "not uploading digest list\n", RPM_PARSER);
+ return 0;
+ }
+
if ((pid = fork()) == 0) {
execlp(RPM_PARSER, RPM_PARSER, (type == TR_ADDED) ?
"add" : "del", path, NULL);
--
2.33.0