summaryrefslogtreecommitdiff
path: root/Check-rpm-parser.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Check-rpm-parser.patch')
-rw-r--r--Check-rpm-parser.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/Check-rpm-parser.patch b/Check-rpm-parser.patch
new file mode 100644
index 0000000..43052a2
--- /dev/null
+++ b/Check-rpm-parser.patch
@@ -0,0 +1,29 @@
+From 18df7feaf512cf4d7548121e1f04d4e7066fb324 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 2/5] 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 bb778c57f..c62f8c22f 100644
+--- a/plugins/digest_list.c
++++ b/plugins/digest_list.c
+@@ -131,6 +131,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.26.2
+