]> code.ossystems Code Review - openembedded-core.git/commit
wic: make engine.py:get_partitions() resilient to parted/dmidecode stderr output
authorGeoff Parker <geoffhp@gmail.com>
Thu, 11 Oct 2018 16:31:26 +0000 (09:31 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 12 Oct 2018 07:44:05 +0000 (08:44 +0100)
commitd6936301d7598b7a783beaae95109555faf6cc17
treef07ae18cc7e8121ced1a771592023f78d1ee8f44
parent370fda1b2e8d5dc011522131bba4106de26bfb19
wic: make engine.py:get_partitions() resilient to parted/dmidecode stderr output

Running wic commands on Debian 10 systems fail in
scripts/lib/wic/engine.py:get_partitions() due to new stderr output captured
when trying to parse the output from /sbin/parted as a non-root user.

The parted command calls the dmidecode utility, which produces this error
as a non-root user:
    /sys/firmware/dmi/tables/smbios_entry_point: Permission denied
    /dev/mem: Permission denied

scripts/lib/wic/engine.py:get_partitions() calls misc.py:exec_cmd(),
a subprocess wrapper which returns a combined stderr and sdtdout.
These messages to stderr confuse the partition table parser in
get_partitions().

This patch has the partition table parser ignore lines before the expected
"BYT;" header string.

Running wic in Debian 9 does not have this issue.

Signed-off-by: Geoff Parker <geoffhp@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/wic/engine.py