diff options
| -rw-r--r-- | meta/lib/oe/patch.py | 11 |
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 | ||
| 7 | import os | ||
| 8 | import shlex | ||
| 9 | import subprocess | ||
| 7 | import oe.path | 10 | import oe.path |
| 8 | import oe.types | 11 | import oe.types |
| 9 | import subprocess | ||
| 10 | 12 | ||
| 11 | class NotFoundError(bb.BBHandledException): | 13 | class 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 | ||
| 29 | def runcmd(args, dir = None): | 31 | def 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 | |||
