summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Hernandez Samaniego <alejandro@enedino.org>2023-06-26 15:29:25 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2023-06-28 07:56:34 +0100
commitabeb4f1a7c7cec22c578fdc07f6125714559206b (patch)
tree9d15372435d231d436df87a2c20b374028901e7b
parentd56c8e4c8a2fc4250d1284354c12b51b80f07949 (diff)
downloadpoky-abeb4f1a7c7cec22c578fdc07f6125714559206b.tar.gz
runqemu: Fix automated call to runqemu-ifup
When runqemu tries to call runqemu-ifup to create tap devices, it checks the output of runqemu-ifup to get the newly created tap device. The behavior of runqemu-ifup was recently modified along with its output, it no longer expects the uid parameter to be passed and it prints out a warning if it was, since this warning was now part of the output runqemu tries to parse it and convert it to an int() which proved impossible. Pass the correct arguments to the runqemu-ifup call and echo the warning to stderr instead to make sure its not being parsed and used by runqemu in any case. (From OE-Core rev: ce3a2f4cec28290c8e530989f17243f1ada4e3bd) Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rwxr-xr-xscripts/runqemu2
-rwxr-xr-xscripts/runqemu-ifup2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/runqemu b/scripts/runqemu
index 3f187ca793..6a3fbb2d6f 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -1186,7 +1186,7 @@ to your build configuration.
1186 gid = os.getgid() 1186 gid = os.getgid()
1187 uid = os.getuid() 1187 uid = os.getuid()
1188 logger.info("Setting up tap interface under sudo") 1188 logger.info("Setting up tap interface under sudo")
1189 cmd = ('sudo', self.qemuifup, str(uid), str(gid)) 1189 cmd = ('sudo', self.qemuifup, str(gid))
1190 try: 1190 try:
1191 tap = subprocess.check_output(cmd).decode('utf-8').strip() 1191 tap = subprocess.check_output(cmd).decode('utf-8').strip()
1192 except subprocess.CalledProcessError as e: 1192 except subprocess.CalledProcessError as e:
diff --git a/scripts/runqemu-ifup b/scripts/runqemu-ifup
index c65ceaf1c8..05c9325b6b 100755
--- a/scripts/runqemu-ifup
+++ b/scripts/runqemu-ifup
@@ -30,7 +30,7 @@ if [ $EUID -ne 0 ]; then
30fi 30fi
31 31
32if [ $# -eq 2 ]; then 32if [ $# -eq 2 ]; then
33 echo "Warning: uid parameter is ignored. It is no longer needed." 33 echo "Warning: uid parameter is ignored. It is no longer needed." >&2
34 GROUP="$2" 34 GROUP="$2"
35elif [ $# -eq 1 ]; then 35elif [ $# -eq 1 ]; then
36 GROUP="$1" 36 GROUP="$1"