osbuild/PR1610.patch

38 lines
1.5 KiB
Diff

From bdbecf4a695750abc4488e893241df80389c2aa6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= <thozza@redhat.com>
Date: Thu, 22 Feb 2024 20:47:03 +0100
Subject: [PATCH] Sources/containers-storage: make the code Python 3.6
compliant
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The source implementation used `subprocess.run()` argument
`capture_output`, which was added in Python 3.7. Since the minimum
supported Python version for osbuild on RHEL-8 is 3.6, the stage fails
with TypeError.
Example failure: https://artifacts.dev.testing-farm.io/c147b608-c40e-46ed-bf11-6b15ecf718dc/
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
---
sources/org.osbuild.containers-storage | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sources/org.osbuild.containers-storage b/sources/org.osbuild.containers-storage
index f83eb4fa..ea18e08c 100755
--- a/sources/org.osbuild.containers-storage
+++ b/sources/org.osbuild.containers-storage
@@ -77,7 +77,7 @@ class ContainersStorageSource(sources.SourceService):
image_id = checksum.split(":")[1]
source = self.local_image_name(image_id)
res = sp.run(["skopeo", "inspect", "--raw", "--config", source],
- check=False, capture_output=True, universal_newlines=True)
+ check=False, stdout=sp.PIPE, stderr=sp.PIPE, universal_newlines=True)
# fail early if the user hasn't imported the container into
# containers-storage
--
2.43.2