[elbe-devel] [PATCH 1/6] elbepack: finetuning: correctly parse mknod parameters
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon May 27 14:12:14 CEST 2024
All mknod parameters are taken verbatim from a singular xml attribute.
While this is ugly as it ties the xml schema to the syntax of the mknod
command, there is not much to be done at this point.
Split the attribute value, so it ends up as multiple exec() arguments.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/finetuning.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/elbepack/finetuning.py b/elbepack/finetuning.py
index f80e21a43cb8..d57ae736b12f 100644
--- a/elbepack/finetuning.py
+++ b/elbepack/finetuning.py
@@ -6,6 +6,7 @@ import base64
import errno
import logging
import os
+import shlex
import subprocess
from shutil import rmtree
@@ -98,7 +99,7 @@ class MkdirAction(FinetuningAction):
class MknodAction(FinetuningAction):
def execute(self, _buildenv, target):
- do(['mknod', target.fname(self.node.et.text), self.node.et.attrib['opts']])
+ do(['mknod', target.fname(self.node.et.text), *shlex.split(self.node.et.attrib['opts'])])
@FinetuningAction.register('buildenv_mkdir')
--
2.45.1
More information about the elbe-devel
mailing list