[oe-commits] [openembedded-core] 61/122: wic: When using --use-uuid make sure that we update the fstab with PARTUUID

git at git.openembedded.org git at git.openembedded.org
Mon Dec 4 17:25:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

rpurdie pushed a commit to branch rocko
in repository openembedded-core.

commit 1d1fdcaf8702110783f2003cd3f8ae96c99a6d72
Author: Tom Rini <trini at konsulko.com>
AuthorDate: Thu Sep 21 13:46:16 2017 -0400

    wic: When using --use-uuid make sure that we update the fstab with PARTUUID
    
    When we have been told to use the UUID we should also update the fstab
    to make use of PARTUUID instead of hard-coding the device in question.
    This will make the resulting image much more portable.
    
    Signed-off-by: Tom Rini <trini at konsulko.com>
    Signed-off-by: Ross Burton <ross.burton at intel.com>
    Signed-off-by: Armin Kuster <akuster at mvista.com>
---
 scripts/lib/wic/plugins/imager/direct.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index bdb8385..da1c061 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -140,9 +140,12 @@ class DirectPlugin(ImagerPlugin):
                or part.mountpoint == "/":
                 continue
 
-            # mmc device partitions are named mmcblk0p1, mmcblk0p2..
-            prefix = 'p' if  part.disk.startswith('mmcblk') else ''
-            device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
+            if part.use_uuid:
+                device_name = "PARTUUID=%s" % part.uuid
+            else:
+                # mmc device partitions are named mmcblk0p1, mmcblk0p2..
+                prefix = 'p' if  part.disk.startswith('mmcblk') else ''
+                device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
 
             opts = part.fsopts if part.fsopts else "defaults"
             line = "\t".join([device_name, part.mountpoint, part.fstype,

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list