diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-04-19 11:53:14 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-04-20 08:19:46 +0100 |
commit | b71709b0e23271e4bc768b7f75aa741179f88f12 (patch) | |
tree | e92483d855063d37aee863d09b85b6a0d9b0a6d9 /scripts/lib/wic | |
parent | 91aa78a8cdd9f2a46cb8077e348a48ce374b5244 (diff) | |
download | poky-b71709b0e23271e4bc768b7f75aa741179f88f12.tar.gz |
wic/imager/direct: Ensure correct ROOTFS_DIR is shown
This changes the output of "wic create mkefidisk -e core-image-sato" from:
The following build artifacts were used to create the image(s):
ROOTFS_DIR: /media/build1/poky/build/tmp.wic.ybraavmb/rootfs_copy
to:
The following build artifacts were used to create the image(s):
ROOTFS_DIR: /media/build1/poky/build/tmp/work/qemux86_64-poky-linux/core-image-sato/1.0-r0/rootfs
which s much less confusing for the user.
[YOCTO #12564]
(From OE-Core rev: a4941af2d3624aecc5dcd7ff54b7ea8c9e9dee8b)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r-- | scripts/lib/wic/plugins/imager/direct.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py index 71c0b1c82b..1fa6b917e6 100644 --- a/scripts/lib/wic/plugins/imager/direct.py +++ b/scripts/lib/wic/plugins/imager/direct.py | |||
@@ -63,6 +63,7 @@ class DirectPlugin(ImagerPlugin): | |||
63 | 63 | ||
64 | # parse possible 'rootfs=name' items | 64 | # parse possible 'rootfs=name' items |
65 | self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' ')) | 65 | self.rootfs_dir = dict(rdir.split('=') for rdir in rootfs_dir.split(' ')) |
66 | self.replaced_rootfs_paths = {} | ||
66 | self.bootimg_dir = bootimg_dir | 67 | self.bootimg_dir = bootimg_dir |
67 | self.kernel_dir = kernel_dir | 68 | self.kernel_dir = kernel_dir |
68 | self.native_sysroot = native_sysroot | 69 | self.native_sysroot = native_sysroot |
@@ -183,6 +184,7 @@ class DirectPlugin(ImagerPlugin): | |||
183 | new_rootfs = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) | 184 | new_rootfs = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR")) |
184 | if new_rootfs: | 185 | if new_rootfs: |
185 | # rootfs was copied to update fstab | 186 | # rootfs was copied to update fstab |
187 | self.replaced_rootfs_paths[new_rootfs] = self.rootfs_dir['ROOTFS_DIR'] | ||
186 | self.rootfs_dir['ROOTFS_DIR'] = new_rootfs | 188 | self.rootfs_dir['ROOTFS_DIR'] = new_rootfs |
187 | 189 | ||
188 | for part in self.parts: | 190 | for part in self.parts: |
@@ -258,7 +260,10 @@ class DirectPlugin(ImagerPlugin): | |||
258 | suffix = ':' | 260 | suffix = ':' |
259 | else: | 261 | else: |
260 | suffix = '["%s"]:' % (part.mountpoint or part.label) | 262 | suffix = '["%s"]:' % (part.mountpoint or part.label) |
261 | msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), part.rootfs_dir) | 263 | rootdir = part.rootfs_dir |
264 | if rootdir in self.replaced_rootfs_paths: | ||
265 | rootdir = self.replaced_rootfs_paths[rootdir] | ||
266 | msg += ' ROOTFS_DIR%s%s\n' % (suffix.ljust(20), rootdir) | ||
262 | 267 | ||
263 | msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir | 268 | msg += ' BOOTIMG_DIR: %s\n' % self.bootimg_dir |
264 | msg += ' KERNEL_DIR: %s\n' % self.kernel_dir | 269 | msg += ' KERNEL_DIR: %s\n' % self.kernel_dir |