Re: Install packages to an "image" without its dependencies being pulled in. #yocto
Yes. This is a version of the question - "how do I build an image that *ONLY* includes the packages I explicitly specify". This involves bypassing a lot of guards and bitbake tooling, but it can be done. Your mileage may vary depending on your distro setup. In particular this assumes you are configured to use the IPK package format. The dnf command had significant issues a while back, so I switched from RPM to IPK. If you use RPM, the OPKG_ARGS stuff not going to work for you. IMAGE_FEATURES = "" LDCONFIGDEPEND = "" IMAGE_INSTALL = "" PACAKGE_INSTALL = "" OPKG_ARGS += "--no-install-recommends --nodeps --force-depends" ROOTFS_POSTPROCESS_COMMAND_remove = "systemd_create_users; " ROOTFS_POSTPROCESS_COMMAND_remove = "rootfs_update_timestamp; " ROOTFS_POSTPROCESS_COMMAND_remove = "rootfs_reproducible; " IMAGE_CMD_cpio_prepend() { IMAGE_BUILDING_DEBUGFS="true" } If you want the pre and postinstall scripts to trigger, you need to add an IMAGE_PREPROCESS_COMMAND function that takes your PACKAGE_INSTALL list and concatenates the package level control, preinst, and postinst scripts. This involves unpacking the ipk found in ${WORKDIR}/oe-rootfs-repo/*/${PKG}_*.ipk. You may also want to post-process the resulting script to remove "set -e" invocations, since those scripts make assumptions about dependencies that you are (hopefully) safe to ignore. You may also want another IMAGE_PREPROCESS_COMMAND function that deletes stuff that can accidentally overwrite your image rootfs files, like /etc/passwd and /etc/group. Once you get it all dialed in, you can probably abstract the useful bits to your own image-layer bbclass so you can trivially reuse it. ..Ch:W..
On Fri, Aug 20, 2021 at 12:36 AM <bibibobibo@...> wrote: Greetings everyone, -- "Perfection must be reached by degrees; she requires the slow hand of time." - Voltaire
|
|