python-blivet: 3.9.2 -> 3.12.1

Upgrade python-blivet from 3.9.2 to 3.12.1:

* rebase 0002-run_program-support-timeout.patch

Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Kai Kang 2025-04-02 14:49:31 +08:00 committed by Khem Raj
parent fc17e47134
commit 0a4e093940
No known key found for this signature in database
GPG Key ID: BB053355919D3314
2 changed files with 12 additions and 8 deletions

View File

@ -6,15 +6,19 @@ Subject: [PATCH 02/11] run_program support timeout
Upstream-Status: Pending
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Rebase for blivet 3.12.1.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
blivet/util.py | 70 +++++++++++++++++++++++++++++---------------------
blivet/util.py | 70 ++++++++++++++++++++++++++++++++++------------------------
1 file changed, 41 insertions(+), 29 deletions(-)
diff --git a/blivet/util.py b/blivet/util.py
index f8a8f88..a5da7b6 100644
index d194a5b..5985164 100644
--- a/blivet/util.py
+++ b/blivet/util.py
@@ -171,6 +171,30 @@ class Path(str):
@@ -169,6 +169,30 @@ class Path(str):
def __hash__(self):
return self._path.__hash__()
@ -45,7 +49,7 @@ index f8a8f88..a5da7b6 100644
def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False):
if env_prune is None:
@@ -193,35 +217,23 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
@@ -191,35 +215,23 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa
stderr_dir = subprocess.STDOUT
else:
stderr_dir = subprocess.PIPE
@ -58,7 +62,7 @@ index f8a8f88..a5da7b6 100644
- preexec_fn=chroot, cwd=root, env=env)
-
- out, err = proc.communicate()
- if not binary_output and six.PY3:
- if not binary_output:
- out = out.decode("utf-8")
- if out:
- if not stderr_to_stdout:
@ -85,7 +89,8 @@ index f8a8f88..a5da7b6 100644
+ stderr=stderr_dir,
+ close_fds=True,
+ preexec_fn=chroot, cwd=root, env=env)
+ if not binary_output and six.PY3:
+
+ if not binary_output:
+ out = out.decode("utf-8")
+ if out:
+ if not stderr_to_stdout:
@ -94,7 +99,6 @@ index f8a8f88..a5da7b6 100644
+ program_log.info("%s", line)
+
+ return (res, out)
+
def run_program(*args, **kwargs):

View File

@ -16,7 +16,7 @@ SRC_URI += "\
file://0010-invoking-mkfs-with-infinite-timeout.patch \
file://0011-invoking-dd-with-infinite-timeout.patch \
"
SRC_URI[sha256sum] = "9d97e37ebba01db28a1e6155cbd71c54fb55e9c2be5921982dc85bed316d8cfe"
SRC_URI[sha256sum] = "54775ba212d1574b1b0750ce147f0d3cf3b5d73aaf040d172283edb57db4ba15"
inherit pypi features_check systemd setuptools3_legacy