summaryrefslogtreecommitdiffstats
path: root/scripts/lib/wic
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/wic')
-rw-r--r--scripts/lib/wic/plugins/imager/direct.py7
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