diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2018-11-27 16:32:38 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-11-27 11:13:36 -0800 |
commit | f01d87a7e841a54ce7fa3b96d404451197dfe183 (patch) | |
tree | d951761c0882ca40b027b908abb4c69140d9b381 /meta-python/recipes-extended/python-blivet/python3-blivet/0002-run_program-support-timeout.patch | |
parent | 2a9489ba365546dbd035d5a3aebc899224354bbe (diff) | |
download | meta-openembedded-f01d87a7e841a54ce7fa3b96d404451197dfe183.tar.gz |
python3-blivet: 3.0.1 -> 3.1.1
Drop 0012-remove-dmraid-dependency-check.patch and
0013-add-Z-y-and-y-to-lvm.pvcreate.patch which the
new version has fixed the issues
Signed-off-by: Hongxu Jia <hongxu.jia@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 | 21 |
1 files changed, 11 insertions, 10 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 fea2254074..5b388599bf 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 | |||
@@ -1,20 +1,20 @@ | |||
1 | From 596979ed58109141a7fee680ab95b27296c022b1 Mon Sep 17 00:00:00 2001 | 1 | From 713cf821ebe17f9e1771502a85e0905ea04dafae Mon Sep 17 00:00:00 2001 |
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
3 | Date: Mon, 8 May 2017 14:39:56 +0800 | 3 | Date: Fri, 23 Nov 2018 17:03:58 +0800 |
4 | Subject: [PATCH 02/11] run_program support timeout | 4 | Subject: [PATCH 02/11] run_program support timeout |
5 | 5 | ||
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 | --- | 9 | --- |
10 | blivet/util.py | 68 +++++++++++++++++++++++++++++++++------------------------- | 10 | blivet/util.py | 70 ++++++++++++++++++++++++++++++++++------------------------ |
11 | 1 file changed, 39 insertions(+), 29 deletions(-) | 11 | 1 file changed, 41 insertions(+), 29 deletions(-) |
12 | 12 | ||
13 | diff --git a/blivet/util.py b/blivet/util.py | 13 | diff --git a/blivet/util.py b/blivet/util.py |
14 | index 0f2a995..05a253c 100644 | 14 | index 4eac8b9..4f05076 100644 |
15 | --- a/blivet/util.py | 15 | --- a/blivet/util.py |
16 | +++ b/blivet/util.py | 16 | +++ b/blivet/util.py |
17 | @@ -157,6 +157,30 @@ class Path(str): | 17 | @@ -158,6 +158,30 @@ class Path(str): |
18 | def __hash__(self): | 18 | def __hash__(self): |
19 | return self._path.__hash__() | 19 | return self._path.__hash__() |
20 | 20 | ||
@@ -45,12 +45,12 @@ index 0f2a995..05a253c 100644 | |||
45 | 45 | ||
46 | def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False): | 46 | def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=False, binary_output=False): |
47 | if env_prune is None: | 47 | if env_prune is None: |
48 | @@ -179,36 +203,22 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa | 48 | @@ -180,35 +204,23 @@ def _run_program(argv, root='/', stdin=None, env_prune=None, stderr_to_stdout=Fa |
49 | stderr_dir = subprocess.STDOUT | 49 | stderr_dir = subprocess.STDOUT |
50 | else: | 50 | else: |
51 | stderr_dir = subprocess.PIPE | 51 | stderr_dir = subprocess.PIPE |
52 | - try: | 52 | - try: |
53 | - proc = subprocess.Popen(argv, | 53 | - proc = subprocess.Popen(argv, # pylint: disable=subprocess-popen-preexec-fn |
54 | - stdin=stdin, | 54 | - stdin=stdin, |
55 | - stdout=subprocess.PIPE, | 55 | - stdout=subprocess.PIPE, |
56 | - stderr=stderr_dir, | 56 | - stderr=stderr_dir, |
@@ -78,7 +78,7 @@ index 0f2a995..05a253c 100644 | |||
78 | - program_log.debug("Return code: %d", proc.returncode) | 78 | - program_log.debug("Return code: %d", proc.returncode) |
79 | - | 79 | - |
80 | - return (proc.returncode, out) | 80 | - return (proc.returncode, out) |
81 | 81 | + | |
82 | + res, out = timeout_command(argv, 10, | 82 | + res, out = timeout_command(argv, 10, |
83 | + stdin=stdin, | 83 | + stdin=stdin, |
84 | + stdout=subprocess.PIPE, | 84 | + stdout=subprocess.PIPE, |
@@ -94,9 +94,10 @@ index 0f2a995..05a253c 100644 | |||
94 | + program_log.info("%s", line) | 94 | + program_log.info("%s", line) |
95 | + | 95 | + |
96 | + return (res, out) | 96 | + return (res, out) |
97 | + | ||
98 | |||
97 | 99 | ||
98 | def run_program(*args, **kwargs): | 100 | def run_program(*args, **kwargs): |
99 | return _run_program(*args, **kwargs)[0] | ||
100 | -- | 101 | -- |
101 | 2.7.4 | 102 | 2.7.4 |
102 | 103 | ||