]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
package: Use shlex instead of deprecated pipe
authorOla x Nilsson <olani@axis.com>
Thu, 13 Apr 2023 06:46:32 +0000 (08:46 +0200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 14 Apr 2023 15:44:22 +0000 (16:44 +0100)
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>
meta/lib/oe/package.py

index 7a6b31957a0a37c40d4913875b658efd23441159..edb70daaf1749521cab098c88d12b250baa2e174 100644 (file)
@@ -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)
-