]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
wic: add runtime dependencies on the tools it invokes
authorTrevor Woerner <twoerner@gmail.com>
Sun, 2 Aug 2026 02:09:57 +0000 (22:09 -0400)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 3 Aug 2026 16:38:10 +0000 (17:38 +0100)
wic shells out to a range of host tools (parted, mkfs.*, mcopy, sfdisk,
and more) but, since the recipe was created, has declared none of them,
so an installed wic works only by chance depending on what the host
provides. Declare them as RDEPENDS so they are installed with wic.

The wic image type and wic-tools each carried a copy of that same list,
and the copies had drifted: only wic-tools staged tar-native and
util-linux-native. Neither needs a list of its own now. native.bbclass
makes a native recipe's do_populate_sysroot depend on its RDEPENDS, so
depending on wic-native stages the lot.

Three entries stay written out. cdrtools has only a native recipe, so
there is no package a target or nativesdk wic could name, even though
wic does run mkisofs. grub is bootloader territory and belongs to
whatever drives wic. pseudo is wic-tools staging what the oe-selftest
needs.

AI-Generated: codex/claude-opus 5 (xhigh)
Signed-off-by: Trevor Woerner <twoerner@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes-recipe/image_types_wic.bbclass
meta/recipes-core/meta/wic-tools.bb
meta/recipes-support/wic/wic_0.3.1.bb

index 671577cc062b1cf7db63ed2ef116fad9caf980bf..2dbe89fd899a0f7eae3daef450c39c8ab10bde62 100644 (file)
@@ -112,14 +112,14 @@ do_image_wic[cleandirs] = "${WORKDIR}/build-wic"
 USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
 WKS_FILE_CHECKSUM = "${@wks_checksums(d.getVar('WKS_FILES').split(), d.getVar('WKS_SEARCH_PATH')) if '${USING_WIC}' else ''}"
 do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
-do_image_wic[depends] += "${@' '.join('%s-native:do_populate_sysroot' % r for r in ('wic', 'parted', 'gptfdisk', 'dosfstools', 'mtools'))}"
+do_image_wic[depends] += "wic-native:do_populate_sysroot"
 
 # We ensure all artfacts are deployed (e.g virtual/bootloader)
 do_image_wic[recrdeptask] += "do_deploy"
 do_image_wic[deptask] += "do_image_complete"
 
 WKS_FILE_DEPENDS_DEFAULT = '${@bb.utils.contains_any("BUILD_ARCH", [ 'x86_64', 'i686' ], "syslinux-native", "",d)}'
-WKS_FILE_DEPENDS_DEFAULT += "wic-native bmaptool-native cdrtools-native btrfs-tools-native squashfs-tools-native e2fsprogs-native erofs-utils-native"
+WKS_FILE_DEPENDS_DEFAULT += "cdrtools-native"
 WKS_FILE_DEPENDS_BOOTLOADERS = ""
 WKS_FILE_DEPENDS_BOOTLOADERS:aarch64 = "grub-efi systemd-boot"
 WKS_FILE_DEPENDS_BOOTLOADERS:arm = "systemd-boot"
index a4b7669137dda6a4ac30bf71f954da4543853b03..4a4473469b7f1ecfd533a099e0c4ea1d171a2820 100644 (file)
@@ -4,10 +4,7 @@ LICENSE = "MIT"
 
 DEPENDS = "\
            wic-native \
-           parted-native gptfdisk-native dosfstools-native \
-           mtools-native bmaptool-native grub-native cdrtools-native \
-           btrfs-tools-native squashfs-tools-native pseudo-native \
-           e2fsprogs-native util-linux-native tar-native erofs-utils-native \
+           cdrtools-native grub-native pseudo-native \
            "
 DEPENDS:append:x86 = " syslinux-native"
 DEPENDS:append:x86-64 = " syslinux-native"
index d9b4cc05c4bdbf56448d7188d7ace03cf0c7bc62..116b0a2cd292dc3699156d764b615872d7312611 100644 (file)
@@ -15,6 +15,18 @@ RDEPENDS:${PN} += " \
     python3-json \
     python3-logging \
     python3-misc \
+    parted \
+    gptfdisk \
+    dosfstools \
+    mtools \
+    bmaptool \
+    btrfs-tools \
+    squashfs-tools \
+    e2fsprogs \
+    e2fsprogs-resize2fs \
+    util-linux \
+    tar \
+    erofs-utils \
     "
 
 BBCLASSEXTEND = "native nativesdk"