]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
classes/fs-uuid: Fix command output decoding issue
authorPawel Zalewski <pzalewski@thegoodpenguin.co.uk>
Thu, 22 Dec 2022 10:38:29 +0000 (10:38 +0000)
committerSteve Sakoman <steve@sakoman.com>
Mon, 20 Feb 2023 15:51:44 +0000 (05:51 -1000)
The default return value from subprocess.check_output is an encoded byte.
The applied fix will decode the value to a string.

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>
meta/classes/fs-uuid.bbclass

index 9b53dfba7abf7a210cf07f7f91a7762caff2b620..731ea575bdf9981db6fb3e8b936361634d66bad1 100644 (file)
@@ -4,7 +4,7 @@
 def get_rootfs_uuid(d):
     import subprocess
     rootfs = d.getVar('ROOTFS')
-    output = subprocess.check_output(['tune2fs', '-l', rootfs])
+    output = subprocess.check_output(['tune2fs', '-l', rootfs], text=True)
     for line in output.split('\n'):
         if line.startswith('Filesystem UUID:'):
             uuid = line.split()[-1]