From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mail.openembedded.org (Postfix) with ESMTP id 647E06F897 for ; Thu, 27 Mar 2014 22:08:22 +0000 (UTC) Received: by mail-vc0-f171.google.com with SMTP id lg15so5083903vcb.30 for ; Thu, 27 Mar 2014 15:08:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=z8aONrav37wgLmGrEHi8SNva6IbdSqlxXfQGasnBwZk=; b=v4acq64hIYirJjCNeANl5BWLgeaRA37YAGoc9Ne3pMdLVC6XPqrEM8YRYDm0eL4/ku xqBlZRYpSx+HfkmUWV+lrvuSROwzNfq/LvVUkzS2P3z81vKz9n9AekmmO9Tl1Z7RIt9J 4JY+iMUohxW5V+Lq9AezRZMIP7nvrfiolq4A78kyVk62IqwWSHqpvn3fSv+yG8YR2a+/ Aj/6wzzdol2HWEz3qPGBsuKbgoAad3ZBPkIHr2Y4nxo1phhvtayK1Qpe00h0jtsHTW7+ JZNUyuzdxz4IAS26Nv9ATqcr+fplXotpjJm2VU7AE4DUhj+Ya0EYLmEbx1oypBIruapS gRog== X-Received: by 10.221.4.66 with SMTP id ob2mr3274568vcb.28.1395958104064; Thu, 27 Mar 2014 15:08:24 -0700 (PDT) Received: from localhost.localdomain ([187.106.6.19]) by mx.google.com with ESMTPSA id am5sm5771903vdc.15.2014.03.27.15.08.22 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 27 Mar 2014 15:08:23 -0700 (PDT) From: =?UTF-8?q?Jo=C3=A3o=20Henrique=20Ferreira=20de=20Freitas?= To: openembedded-core@lists.openembedded.org Date: Thu, 27 Mar 2014 19:07:57 -0300 Message-Id: <1395958078-5191-7-git-send-email-joaohf@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1395958078-5191-1-git-send-email-joaohf@gmail.com> References: <1394918271-14153-1-git-send-email-joaohf@gmail.com> <1395958078-5191-1-git-send-email-joaohf@gmail.com> MIME-Version: 1.0 Cc: tom.zanussi@linux.intel.com Subject: [PATCH v3 6/7] wic: Report all ROOTFS_DIR artifacts X-BeenThere: openembedded-core@lists.openembedded.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: Patches and discussions about the oe-core layer List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 22:08:24 -0000 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- scripts/lib/mic/imager/direct.py | 18 ++++++++++++++---- scripts/lib/mic/kickstart/custom_commands/partition.py | 13 +++++++++++++ scripts/lib/mic/plugins/source/rootfs.py | 1 + 3 files changed, 28 insertions(+), 4 deletions(-) diff --git a/scripts/lib/mic/imager/direct.py b/scripts/lib/mic/imager/direct.py index f8c300c..07a47ea 100644 --- a/scripts/lib/mic/imager/direct.py +++ b/scripts/lib/mic/imager/direct.py @@ -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) diff --git a/scripts/lib/mic/kickstart/custom_commands/partition.py b/scripts/lib/mic/kickstart/custom_commands/partition.py index 887195f..6b575c0 100644 --- a/scripts/lib/mic/kickstart/custom_commands/partition.py +++ b/scripts/lib/mic/kickstart/custom_commands/partition.py @@ -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(). diff --git a/scripts/lib/mic/plugins/source/rootfs.py b/scripts/lib/mic/plugins/source/rootfs.py index da7aa0b..83aec45 100644 --- a/scripts/lib/mic/plugins/source/rootfs.py +++ b/scripts/lib/mic/plugins/source/rootfs.py @@ -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) -- 1.8.3.2