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:22 +0100 |
commit | 47731e0f7d9e92db39a3d551fe50df69c1cc6d6a (patch) | |
tree | 864a4438507d30d87d17009b6458a49fb10b86ea | |
parent | 5f33c7b99a991c380d1813da8248ba5470ca4d4e (diff) | |
download | openembedded-core-contrib-47731e0f7d9e92db39a3d551fe50df69c1cc6d6a.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.
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
-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 import fnmatch import itertools import os -import pipes +import shlex import re import glob import stat @@ -41,7 +41,7 @@ def runstrip(arg): stripcmd = [strip] skip_strip = False - # kernel module + # kernel module if elftype & 16: if is_kernel_module_signed(file): bb.debug(1, "Skip strip on signed module %s" % file) @@ -1556,7 +1556,7 @@ def process_shlibs(pkgfiles, d): sonames = set() renames = [] ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '') - cmd = d.getVar('OBJDUMP') + " -p " + pipes.quote(file) + " 2>/dev/null" + cmd = d.getVar('OBJDUMP') + " -p " + shlex.quote(file) + " 2>/dev/null" fd = os.popen(cmd) lines = fd.readlines() fd.close() @@ -2012,4 +2012,3 @@ def process_depchains(pkgfiles, d): for dep in bb.utils.explode_deps(d.getVar('RDEPENDS:' + base) or ""): add_dep(rdeps, dep) pkg_addrrecs(pkg, base, suffix, func, rdeps, d) - |