]> code.ossystems Code Review - openembedded-core.git/commitdiff
wic: Report all ROOTFS_DIR artifacts
authorJoão Henrique Ferreira de Freitas <joaohf@gmail.com>
Sat, 29 Mar 2014 03:12:07 +0000 (00:12 -0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 30 Mar 2014 09:01:58 +0000 (10:01 +0100)
When a .wks has more than one ROOTFS_DIR it's better to report
all ROOTFS_DIR that was used to create the image.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/mic/imager/direct.py
scripts/lib/mic/kickstart/custom_commands/partition.py
scripts/lib/mic/plugins/source/rootfs.py

index 1f2f8fcf9ce1f2a1f339dfbd7e0f0dd73461b0bd..ac63c3890371ae2bb0c8ad1e073e845d212d3eb4 100644 (file)
@@ -321,15 +321,25 @@ class DirectImageCreator(BaseImageCreator):
         """
         msg = "The new image(s) can be found here:\n"
 
+        parts = self._get_parts()
+
         for disk_name, disk in self.__instimage.disks.items():
             full_path = self._full_path(self.__imgdir, disk_name, "direct")
             msg += '  %s\n\n' % full_path
 
         msg += 'The following build artifacts were used to create the image(s):\n'
-        msg += '  ROOTFS_DIR:      %s\n' % self.rootfs_dir
-        msg += '  BOOTIMG_DIR:     %s\n' % self.bootimg_dir
-        msg += '  KERNEL_DIR:      %s\n' % self.kernel_dir
-        msg += '  NATIVE_SYSROOT:  %s\n' % self.native_sysroot
+        for p in parts:
+            if p.get_rootfs() is None:
+                continue
+            if p.mountpoint == '/':
+                str = ':'
+            else:
+                str = '["%s"]:' % p.label
+            msg += '  ROOTFS_DIR%s%s\n' % (str.ljust(20), p.get_rootfs())
+
+        msg += '  BOOTIMG_DIR:                  %s\n' % self.bootimg_dir
+        msg += '  KERNEL_DIR:                   %s\n' % self.kernel_dir
+        msg += '  NATIVE_SYSROOT:               %s\n' % self.native_sysroot
 
         msger.info(msg)
 
index 887195fa60f5968a701513c9239c567a9986a100..6b575c0e8d9324154124a35a80313b6f0667d4cd 100644 (file)
@@ -59,6 +59,19 @@ class Wic_PartData(Mic_PartData):
 
         return retval
 
+    def get_rootfs(self):
+        """
+        Acessor for rootfs dir
+        """
+        return self.rootfs
+
+    def set_rootfs(self, rootfs):
+        """
+        Acessor for actual rootfs dir, which must be set by source
+        plugins.
+        """
+        self.rootfs = rootfs
+
     def get_size(self):
         """
         Accessor for partition size, 0 or --size before set_size().
index 974d85409b529d28a1e0842202dff4f58fc00507..63238111836d83e3237b952c5a06ad7e46d2cca0 100644 (file)
@@ -54,5 +54,6 @@ class RootfsPlugin(SourcePlugin):
         if part.rootfs:
             rootfs_dir = part.rootfs 
 
+        part.set_rootfs(rootfs_dir)
         part.prepare_rootfs(cr_workdir, oe_builddir, rootfs_dir, native_sysroot)