mirror of
https://git.yoctoproject.org/poky
synced 2026-04-17 18:32:12 +02:00
qemurunner: fix ip fallback detection
When falling back from detecting ip from /proc/./cmdline the output of runqemu is acutally 'Network configuration: ip=192.168.7.2::192.168.7.1::255.255.255.0' which doesn't match the given regex and leading to run failure, although IP is detectable. Fix regex by inserting an optional 'ip=' prefix to first IP (From OE-Core rev: 9c2efe41d5d894094552c4bbc4180675a5aac751) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 75f2471d15fab024775c59cb70c54e3f25f9ae72) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
56035c1714
commit
9aefaf5de9
@@ -287,7 +287,7 @@ class QemuRunner:
|
||||
self.logger.debug("qemu cmdline used:\n{}".format(cmdline))
|
||||
except (IndexError, ValueError):
|
||||
# Try to get network configuration from runqemu output
|
||||
match = re.match(r'.*Network configuration: ([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
|
||||
match = re.match(r'.*Network configuration: (?:ip=)*([0-9.]+)::([0-9.]+):([0-9.]+)$.*',
|
||||
out, re.MULTILINE|re.DOTALL)
|
||||
if match:
|
||||
self.ip, self.server_ip, self.netmask = match.groups()
|
||||
|
||||
Reference in New Issue
Block a user