diff options
| author | Pawel Zalewski <pzalewski@thegoodpenguin.co.uk> | 2022-12-22 10:38:29 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-02-15 21:46:56 +0000 |
| commit | 73aa76f3a1d569498de370ce70a712a609d20d99 (patch) | |
| tree | bc7cc0d06fb7a521b893c7c3f3a4d12b56fcc1a9 | |
| parent | e68aecd2a4e310f1af3db172289da1a9dac1b68f (diff) | |
| download | poky-73aa76f3a1d569498de370ce70a712a609d20d99.tar.gz | |
classes/fs-uuid: Fix command output decoding issue
The default return value from subprocess.check_output is an encoded byte.
The applied fix will decode the value to a string.
(From OE-Core rev: ffa1de16fa82fbe7dfbed4c5ae0fc4e6d51e7ff3)
Signed-off-by: Pawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
(cherry picked from commit 046769fa952a511865c416b80d10af6287147fb7)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/fs-uuid.bbclass | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/meta/classes/fs-uuid.bbclass b/meta/classes/fs-uuid.bbclass index 9b53dfba7a..731ea575bd 100644 --- a/meta/classes/fs-uuid.bbclass +++ b/meta/classes/fs-uuid.bbclass | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | def get_rootfs_uuid(d): | 4 | def get_rootfs_uuid(d): |
| 5 | import subprocess | 5 | import subprocess |
| 6 | rootfs = d.getVar('ROOTFS') | 6 | rootfs = d.getVar('ROOTFS') |
| 7 | output = subprocess.check_output(['tune2fs', '-l', rootfs]) | 7 | output = subprocess.check_output(['tune2fs', '-l', rootfs], text=True) |
| 8 | for line in output.split('\n'): | 8 | for line in output.split('\n'): |
| 9 | if line.startswith('Filesystem UUID:'): | 9 | if line.startswith('Filesystem UUID:'): |
| 10 | uuid = line.split()[-1] | 10 | uuid = line.split()[-1] |
