diff options
author | Ola x Nilsson <olani@axis.com> | 2023-04-13 08:46:32 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-04-14 16:44:24 +0100 |
commit | 1d70f5b466afcf7204e855825888ec3ab824bafc (patch) | |
tree | 70fb99b3aaa7313138204a0fa8cc326b80cee290 /meta/lib/oe/package.py | |
parent | 2f958e043a6348c09c3b8bb0f6dececf17c04dae (diff) | |
download | poky-1d70f5b466afcf7204e855825888ec3ab824bafc.tar.gz |
package: Use shlex instead of deprecated pipe
The pipe library is deprecated in Python 3.11 and will be removed in
Python 3.13. pipe.quote is just an import of shlex.quote anyway.
(From OE-Core rev: 47731e0f7d9e92db39a3d551fe50df69c1cc6d6a)
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe/package.py')
-rw-r--r-- | meta/lib/oe/package.py | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 7a6b31957a..edb70daaf1 100644 --- a/meta/lib/oe/package.py +++ b/meta/lib/oe/package.py | |||
@@ -8,7 +8,7 @@ import errno | |||
8 | import fnmatch | 8 | import fnmatch |
9 | import itertools | 9 | import itertools |
10 | import os | 10 | import os |
11 | import pipes | 11 | import shlex |
12 | import re | 12 | import re |
13 | import glob | 13 | import glob |
14 | import stat | 14 | import stat |
@@ -41,7 +41,7 @@ def runstrip(arg): | |||
41 | 41 | ||
42 | stripcmd = [strip] | 42 | stripcmd = [strip] |
43 | skip_strip = False | 43 | skip_strip = False |
44 | # kernel module | 44 | # kernel module |
45 | if elftype & 16: | 45 | if elftype & 16: |
46 | if is_kernel_module_signed(file): | 46 | if is_kernel_module_signed(file): |
47 | bb.debug(1, "Skip strip on signed module %s" % file) | 47 | bb.debug(1, "Skip strip on signed module %s" % file) |
@@ -1556,7 +1556,7 @@ def process_shlibs(pkgfiles, d): | |||
1556 | sonames = set() | 1556 | sonames = set() |
1557 | renames = [] | 1557 | renames = [] |
1558 | ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '') | 1558 | ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '') |
1559 | cmd = d.getVar('OBJDUMP') + " -p " + pipes.quote(file) + " 2>/dev/null" | 1559 | cmd = d.getVar('OBJDUMP') + " -p " + shlex.quote(file) + " 2>/dev/null" |
1560 | fd = os.popen(cmd) | 1560 | fd = os.popen(cmd) |
1561 | lines = fd.readlines() | 1561 | lines = fd.readlines() |
1562 | fd.close() | 1562 | fd.close() |
@@ -2012,4 +2012,3 @@ def process_depchains(pkgfiles, d): | |||
2012 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS:' + base) or ""): | 2012 | for dep in bb.utils.explode_deps(d.getVar('RDEPENDS:' + base) or ""): |
2013 | add_dep(rdeps, dep) | 2013 | add_dep(rdeps, dep) |
2014 | pkg_addrrecs(pkg, base, suffix, func, rdeps, d) | 2014 | pkg_addrrecs(pkg, base, suffix, func, rdeps, d) |
2015 | |||