diff options
author | Kai Kang <kai.kang@windriver.com> | 2025-04-02 14:49:31 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2025-04-02 07:29:32 -0700 |
commit | 0a4e093940df5b21ae216b9b4ed1488bdb9d23ce (patch) | |
tree | 9ec5cd1e088fae95d46d0ad0000f86b385e4098c /meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch | |
parent | fc17e4713425b4f65b0eb1423a0283d9c9684080 (diff) | |
download | meta-openembedded-0a4e093940df5b21ae216b9b4ed1488bdb9d23ce.tar.gz |
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>
Diffstat (limited to 'meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch')
-rw-r--r-- | meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch index d277e8b0f7..b577cd4bd4 100644 --- a/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch +++ b/meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch | |||
@@ -6,15 +6,19 @@ Subject: [PATCH 02/11] run_program support timeout | |||
6 | Upstream-Status: Pending | 6 | Upstream-Status: Pending |
7 | 7 | ||
8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | 8 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
9 | |||
10 | Rebase for blivet 3.12.1. | ||
11 | |||
12 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
9 | --- | 13 | --- |
10 | blivet/util.py | 70 +++++++++++++++++++++++++++++--------------------- | 14 | blivet/util.py | 70 ++++++++++++++++++++++++++++++++++------------------------ |
11 | 1 file changed, 41 insertions(+), 29 deletions(-) | 15 | 1 file changed, 41 insertions(+), 29 deletions(-) |
12 | 16 | ||
13 | diff --git a/blivet/util.py b/blivet/util.py | 17 | diff --git a/blivet/util.py b/blivet/util.py |
14 | index f8a8f88..a5da7b6 100644 | 18 | index d194a5b..5985164 100644 |
15 | --- a/blivet/util.py | 19 | --- a/blivet/util.py |
16 | +++ b/blivet/util.py | 20 | +++ b/blivet/util.py |
17 | @@ -171,6 +171,30 @@ class Path(str): | 21 | @@ -169,6 +169,30 @@ class Path(str): |
18 | def __hash__(self): | 22 | def __hash__(self): |
19 | return self._path.__hash__() | 23 | return self._path.__hash__() |
20 | 24 | ||
@@ -45,7 +49,7 @@ index f8a8f88..a5da7b6 100644 | |||
45 | 49 | ||
46 | def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False): | 50 | def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False): |
47 | if env_prune is None: | 51 | if env_prune is None: |
48 | @@ -193,35 +217,23 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa | 52 | @@ -191,35 +215,23 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa |
49 | stderr_dir = subprocess.STDOUT | 53 | stderr_dir = subprocess.STDOUT |
50 | else: | 54 | else: |
51 | stderr_dir = subprocess.PIPE | 55 | stderr_dir = subprocess.PIPE |
@@ -58,7 +62,7 @@ index f8a8f88..a5da7b6 100644 | |||
58 | - preexec_fn=chroot, cwd=root, env=env) | 62 | - preexec_fn=chroot, cwd=root, env=env) |
59 | - | 63 | - |
60 | - out, err = proc.communicate() | 64 | - out, err = proc.communicate() |
61 | - if not binary_output and six.PY3: | 65 | - if not binary_output: |
62 | - out = out.decode("utf-8") | 66 | - out = out.decode("utf-8") |
63 | - if out: | 67 | - if out: |
64 | - if not stderr_to_stdout: | 68 | - if not stderr_to_stdout: |
@@ -85,7 +89,8 @@ index f8a8f88..a5da7b6 100644 | |||
85 | + stderr=stderr_dir, | 89 | + stderr=stderr_dir, |
86 | + close_fds=True, | 90 | + close_fds=True, |
87 | + preexec_fn=chroot, cwd=root, env=env) | 91 | + preexec_fn=chroot, cwd=root, env=env) |
88 | + if not binary_output and six.PY3: | 92 | + |
93 | + if not binary_output: | ||
89 | + out = out.decode("utf-8") | 94 | + out = out.decode("utf-8") |
90 | + if out: | 95 | + if out: |
91 | + if not stderr_to_stdout: | 96 | + if not stderr_to_stdout: |
@@ -94,7 +99,6 @@ index f8a8f88..a5da7b6 100644 | |||
94 | + program_log.info("%s", line) | 99 | + program_log.info("%s", line) |
95 | + | 100 | + |
96 | + return (res, out) | 101 | + return (res, out) |
97 | + | ||
98 | 102 | ||
99 | 103 | ||
100 | def run_program(*args, **kwargs): | 104 | def run_program(*args, **kwargs): |