rpmlint/0001-AppDataCheck-Pass-nonet-to-appstream-util-if-Network.patch
liubo 2f2d49c6f6 AppDataCheck: Pass --nonet to appstream-util if NetworkEnabled is False
Signed-off-by: liubo <liubo1@xfusion.com>
(cherry picked from commit c7d8d01d829ff59697ace08274ce35b6b99671ec)
2023-11-29 09:41:32 +08:00

33 lines
1.0 KiB
Diff

From c5a80c6d83af05b97ebea0014192215d39148226 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
Date: Thu, 14 Sep 2017 13:58:07 +0300
Subject: [PATCH] AppDataCheck: Pass --nonet to appstream-util if
NetworkEnabled is False
---
AppDataCheck.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/AppDataCheck.py b/AppDataCheck.py
index 43320a69..20302d80 100644
--- a/AppDataCheck.py
+++ b/AppDataCheck.py
@@ -28,8 +28,13 @@ class AppDataCheck(AbstractCheck.AbstractFilesCheck):
def check_file(self, pkg, filename):
root = pkg.dirName()
f = root + filename
+
+ checker = appdata_checker
+ if checker[0] == "appstream-util" and not self.network_enabled:
+ checker += ("--nonet",)
+ print(checker)
try:
- st = getstatusoutput(appdata_checker + (f,))
+ st = getstatusoutput(checker + (f,))
except OSError:
# ignore if the checker is not installed
return
--
2.42.0.windows.2