diff mbox series

[kirkstone,13/16] rootfs.py: dont try to list installed packages for baremetal images

Message ID e713e118b46aa0c8a5015b915a93718b7aa20a74.1663078051.git.steve@sakoman.com
State Accepted, archived
Commit e713e118b46aa0c8a5015b915a93718b7aa20a74
Headers show
Series [kirkstone,01/16] cracklib: upgrade 2.9.7 -> 2.9.8 | expand

Commit Message

Steve Sakoman Sept. 13, 2022, 2:17 p.m. UTC
From: Alejandro Hernandez Samaniego <alejandro@enedino.org>

Theres not a rootfs for baremetal images, hence we should avoid
trying to list rootfs packages for them.

This fixes an issue where some classes (e.g. license_image) rely on
rootfs functionality when included for baremetal images even if its
nonexistent

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alejandro@enedino.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 5a7e13f46083ce3b08aa762238c1e93b7626dda4)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/lib/oe/rootfs.py | 4 ++++
 1 file changed, 4 insertions(+)
diff mbox series

Patch

diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 9e6b411fb6..91312f8353 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -384,6 +384,10 @@  def create_rootfs(d, manifest_dir=None, progress_reporter=None, logcatcher=None)
 
 
 def image_list_installed_packages(d, rootfs_dir=None):
+    # Theres no rootfs for baremetal images
+    if bb.data.inherits_class('baremetal-image', d):
+        return ""
+
     if not rootfs_dir:
         rootfs_dir = d.getVar('IMAGE_ROOTFS')