diff mbox series

[kirkstone] package.bbclass: Use shlex instead of deprecated pipes

Message ID 20241212-b4-package-shlex-kirkstone-v1-1-27e5f76049b8@non.se.com
State Under Review
Delegated to: Steve Sakoman
Headers show
Series [kirkstone] package.bbclass: Use shlex instead of deprecated pipes | expand

Commit Message

Ernst Persson via B4 Relay Dec. 12, 2024, 2:36 p.m. UTC
From: Ernst Persson <ernst.persson@non.se.com>

The pipes library is deprecated in Python 3.11 and will be removed in
Python 3.13. pipes.quote is just an import of shlex.quote anyway.

Signed-off-by: Ernst Persson <ernst.persson@non.se.com>
---
This patch is only for Kirkstone, the code has changed
in later versions.
---
 meta/classes/package.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)


---
base-commit: ccf5b0a8896eba43f59151885aeb30b6cfc0573f
change-id: 20241212-b4-package-shlex-kirkstone-674adbaf7c9d

Best regards,
diff mbox series

Patch

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 07bf5eb426e2561512e762729144dfcb5d0bda15..e6ba79346c4468ede9da4bf35be2aebbb261b311 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1850,7 +1850,7 @@  SHLIBSWORKDIR = "${PKGDESTWORK}/${MLPREFIX}shlibs2"
 
 python package_do_shlibs() {
     import itertools
-    import re, pipes
+    import re, shlex
     import subprocess
 
     exclude_shlibs = d.getVar('EXCLUDE_FROM_SHLIBS', False)
@@ -1894,7 +1894,7 @@  python package_do_shlibs() {
         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()