diff options
author | Hongxu Jia <hongxu.jia@windriver.com> | 2018-08-01 16:27:43 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-08-02 11:23:03 -0700 |
commit | d3ae34eec2d312410da6cc1dd1c6fb85e8259261 (patch) | |
tree | 3f827986a0f5c4865d33b05001b2c59601208b76 /meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch | |
parent | 78de74100807303fe304ea0f088317d2aa0be917 (diff) | |
download | meta-openembedded-d3ae34eec2d312410da6cc1dd1c6fb85e8259261.tar.gz |
python3-blivet: 2.2.0 -> 3.0.1
- Drop 0004-Mount-var-volatile-during-install.patch and
0005-update-fstab-by-appending.patch
which are moved to python3-anaconda 28.22.11
- Drop 0013-Revert-Adapt-to-logging-module-name-change.patch
whichis obsolete
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/0007-fix-incorrect-timeout-while-system-time-changed.patch')
-rw-r--r-- | meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch b/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch deleted file mode 100644 index 6512d8642a..0000000000 --- a/meta-python/recipes-extended/python-blivet/python3-blivet/0007-fix-incorrect-timeout-while-system-time-changed.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 78ee2b9090f9400ccc4f730e674f5ae972740ccb Mon Sep 17 00:00:00 2001 | ||
2 | From: Hongxu Jia <hongxu.jia@windriver.com> | ||
3 | Date: Fri, 26 Aug 2016 02:02:49 -0400 | ||
4 | Subject: [PATCH 07/13] fix incorrect timeout while system time changed | ||
5 | |||
6 | While system time changed by NTP, invoking timeout_command | ||
7 | breaks with incorrect timeout. | ||
8 | -------- | ||
9 | |05:40:55,872 INFO program: Running... mount -t ext2 -o | ||
10 | defaults,ro /dev/sda2 /mnt/sysimage | ||
11 | |01:40:55,086 DEBUG program: 10 seconds timeout | ||
12 | -------- | ||
13 | |||
14 | Use numbert count to replace current time count could workaround | ||
15 | the issue. | ||
16 | |||
17 | Upstream-Status: Pending | ||
18 | |||
19 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> | ||
20 | --- | ||
21 | blivet/util.py | 6 +++--- | ||
22 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
23 | |||
24 | diff --git a/blivet/util.py b/blivet/util.py | ||
25 | index 44a2da5..b3c45ac 100644 | ||
26 | --- a/blivet/util.py | ||
27 | +++ b/blivet/util.py | ||
28 | @@ -163,14 +163,14 @@ def timeout_command(argv, timeout, *args, **kwargs): | ||
29 | """call shell-command and either return its output or kill it | ||
30 | if it doesn't normally exit within timeout seconds and return None""" | ||
31 | import subprocess, datetime, os, time, signal | ||
32 | - start = datetime.datetime.now() | ||
33 | + count = 0 | ||
34 | |||
35 | try: | ||
36 | proc = subprocess.Popen(argv, *args, **kwargs) | ||
37 | while proc.poll() is None: | ||
38 | time.sleep(0.1) | ||
39 | - now = datetime.datetime.now() | ||
40 | - if timeout != -1 and (now - start).seconds> timeout: | ||
41 | + count += 1 | ||
42 | + if timeout != -1 and count > timeout*10: | ||
43 | os.kill(proc.pid, signal.SIGKILL) | ||
44 | os.waitpid(-1, os.WNOHANG) | ||
45 | program_log.debug("%d seconds timeout" % timeout) | ||
46 | -- | ||
47 | 2.7.4 | ||
48 | |||