Blob Blame History Raw
From 18f0b3a4712823cf90c4af7541f678a69ca53adb Mon Sep 17 00:00:00 2001
From: Neal Gompa <ngompa13@gmail.com>
Date: Wed, 26 Aug 2020 21:10:30 -0400
Subject: [PATCH 2/2] appcreate/partitionedfs: Ensure __getuuid() actually gets
 the UUID

With Btrfs, UUID and UUID_SUB are both provided by blkid(8). In order
for the right value to be selected, we need to be a tiny bit stricter to
ensure we get the right UUID value.
---
 appcreate/partitionedfs.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/appcreate/partitionedfs.py b/appcreate/partitionedfs.py
index 9e81d2e..1e9fdde 100644
--- a/appcreate/partitionedfs.py
+++ b/appcreate/partitionedfs.py
@@ -398,7 +398,7 @@ class PartitionedMount(Mount):
         devdata = subprocess.Popen(["/sbin/blkid", partition], stdout=subprocess.PIPE)
         devdataout = devdata.communicate()[0].decode("utf-8").split()
         for data in devdataout:
-            if data.startswith("UUID"):
+            if data.startswith("UUID="):
                 UUID = data.replace('"', '')
                 continue
         return UUID
-- 
2.26.2