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>
This commit is contained in:
Ola x Nilsson
2023-04-13 08:46:32 +02:00
committed by Richard Purdie
parent 2f958e043a
commit 1d70f5b466

View File

@@ -8,7 +8,7 @@ import errno
import fnmatch import fnmatch
import itertools import itertools
import os import os
import pipes import shlex
import re import re
import glob import glob
import stat import stat
@@ -1556,7 +1556,7 @@ def process_shlibs(pkgfiles, d):
sonames = set() sonames = set()
renames = [] renames = []
ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '') 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) fd = os.popen(cmd)
lines = fd.readlines() lines = fd.readlines()
fd.close() fd.close()
@@ -2012,4 +2012,3 @@ def process_depchains(pkgfiles, d):
for dep in bb.utils.explode_deps(d.getVar('RDEPENDS:' + base) or ""): for dep in bb.utils.explode_deps(d.getVar('RDEPENDS:' + base) or ""):
add_dep(rdeps, dep) add_dep(rdeps, dep)
pkg_addrrecs(pkg, base, suffix, func, rdeps, d) pkg_addrrecs(pkg, base, suffix, func, rdeps, d)