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 d047b3b947..5990896fdc 100644
--- a/meta/lib/oe/patch.py
+++ b/meta/lib/oe/patch.py
@@ -4,9 +4,11 @@
4# SPDX-License-Identifier: GPL-2.0-only 4# SPDX-License-Identifier: GPL-2.0-only
5# 5#
6 6
7import os
8import shlex
9import subprocess
7import oe.path 10import oe.path
8import oe.types 11import oe.types
9import subprocess
10 12
11class NotFoundError(bb.BBHandledException): 13class NotFoundError(bb.BBHandledException):
12 def __init__(self, path): 14 def __init__(self, path):
@@ -27,8 +29,6 @@ class CmdError(bb.BBHandledException):
27 29
28 30
29def runcmd(args, dir = None): 31def runcmd(args, dir = None):
30 import pipes
31
32 if dir: 32 if dir:
33 olddir = os.path.abspath(os.curdir) 33 olddir = os.path.abspath(os.curdir)
34 if not os.path.exists(dir): 34 if not os.path.exists(dir):
@@ -37,7 +37,7 @@ def runcmd(args, dir = None):
37 # print("cwd: %s -> %s" % (olddir, dir)) 37 # print("cwd: %s -> %s" % (olddir, dir))
38 38
39 try: 39 try:
40 args = [ pipes.quote(str(arg)) for arg in args ] 40 args = [ shlex.quote(str(arg)) for arg in args ]
41 cmd = " ".join(args) 41 cmd = " ".join(args)
42 # print("cmd: %s" % cmd) 42 # print("cmd: %s" % cmd)
43 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True) 43 proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
@@ -217,7 +217,7 @@ class PatchTree(PatchSet):
217 with open(self.seriespath, 'w') as f: 217 with open(self.seriespath, 'w') as f:
218 for p in patches: 218 for p in patches:
219 f.write(p) 219 f.write(p)
220 220
221 def Import(self, patch, force = None): 221 def Import(self, patch, force = None):
222 """""" 222 """"""
223 PatchSet.Import(self, patch, force) 223 PatchSet.Import(self, patch, force)
@@ -952,4 +952,3 @@ def should_apply(parm, d):
952 return False, "applies to later version" 952 return False, "applies to later version"
953 953
954 return True, None 954 return True, None
955