summaryrefslogtreecommitdiffstats
path: root/meta/lib/oe/patch.py
diff options
context:
space:
mode:
Diffstat (limited to 'meta/lib/oe/patch.py')
-rw-r--r--meta/lib/oe/patch.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/meta/lib/oe/patch.py b/meta/lib/oe/patch.py
index 4ec9caed45..e607148ec7 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -2,9 +2,11 @@
2# SPDX-License-Identifier: GPL-2.0-only 2# SPDX-License-Identifier: GPL-2.0-only
3# 3#
4 4
5import os
6import shlex
7import subprocess
5import oe.path 8import oe.path
6import oe.types 9import oe.types
7import subprocess
8 10
9class NotFoundError(bb.BBHandledException): 11class NotFoundError(bb.BBHandledException):
10 def __init__(self, path): 12 def __init__(self, path):
@@ -25,8 +27,6 @@ class CmdError(bb.BBHandledException):
25 27
26 28
27def runcmd(args, dir = None): 29def runcmd(args, dir = None):
28 import pipes
29
30 if dir: 30 if dir:
31 olddir = os.path.abspath(os.curdir) 31 olddir = os.path.abspath(os.curdir)
32 if not os.path.exists(dir): 32 if not os.path.exists(dir):
@@ -35,7 +35,7 @@ def runcmd(args, dir = None):
35 # print("cwd: %s -> %s" % (olddir, dir)) 35 # print("cwd: %s -> %s" % (olddir, dir))
36 36
37 try: 37 try:
38 args = [ pipes.quote(str(arg)) for arg in args ] 38 args = [ shlex.quote(str(arg)) for arg in args ]
39 cmd = " ".join(args) 39 cmd = " ".join(args)
40 # print("cmd: %s" % cmd) 40 # print("cmd: %s" % cmd)
41 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 41 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
@@ -215,7 +215,7 @@ class PatchTree(PatchSet):
215 with open(self.seriespath, 'w') as f: 215 with open(self.seriespath, 'w') as f:
216 for p in patches: 216 for p in patches:
217 f.write(p) 217 f.write(p)
218 218
219 def Import(self, patch, force = None): 219 def Import(self, patch, force = None):
220 """""" 220 """"""
221 PatchSet.Import(self, patch, force) 221 PatchSet.Import(self, patch, force)
@@ -919,4 +919,3 @@ def should_apply(parm, d):
919 return False, "applies to later version" 919 return False, "applies to later version"
920 920
921 return True, None 921 return True, None
922