meta data for this page
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| sw:yocto:bitbake:split_packages [2026/02/23 15:55] – niziak | sw:yocto:bitbake:split_packages [2026/03/10 19:27] (current) – niziak | ||
|---|---|---|---|
| Line 7: | Line 7: | ||
| yocto.yoctoproject.narkive.com/ | yocto.yoctoproject.narkive.com/ | ||
| * Search in Yocto for '' | * Search in Yocto for '' | ||
| + | |||
| + | ===== almost works ===== | ||
| + | |||
| + | Adapted solution from 1st link almost works. Until SPDX fails because '' | ||
| + | |||
| + | <code bash> | ||
| + | |||
| + | PACKAGES += " | ||
| + | PROVIDES += " | ||
| + | CONFFILES: | ||
| + | |||
| + | |||
| + | RREPLACES: | ||
| + | RCONFLICTS: | ||
| + | |||
| + | # ${PN}-devel also provides ${PN} - for compatibility with other packages | ||
| + | # But it breaks SPDX generation in do_rootfs so disable it | ||
| + | RPROVIDES: | ||
| + | |||
| + | CVE_PRODUCT: | ||
| + | |||
| + | python populate_packages: | ||
| + | import shutil | ||
| + | |||
| + | packages = (" | ||
| + | # PKGD (Package Destination Directory): This is the directory where files are | ||
| + | # staged before they are split into individual packages. It represents the intermediate, | ||
| + | # unsplit state of the files that do_install has already installed. | ||
| + | # | ||
| + | # PKGDEST (Package Destination): | ||
| + | # been split. It is often referred to as the packages-split directory, containing subdirectories for | ||
| + | # each package (e.g., pkg-name, pkg-name-dbg, | ||
| + | |||
| + | preinst = d.getVar(' | ||
| + | for package in packages: | ||
| + | d.setVar(d.expand(f" | ||
| + | # copy ${PN} content to other packages | ||
| + | shutil.copytree(d.expand(" | ||
| + | # replace fstab | ||
| + | if package == " | ||
| + | shutil.copy(d.expand(" | ||
| + | } | ||
| + | |||
| + | INSANE_SKIP: | ||
| + | </ | ||
| + | |||
| + | ===== works: create separate package ===== | ||
| + | |||
| + | Create second '' | ||
| + | |||
| + | * Want to change ''/ | ||
| + | <file bash base-files_%.bbappend> | ||
| + | FILESEXTRAPATHS: | ||
| + | |||
| + | SRC_URI: | ||
| + | file:// | ||
| + | " | ||
| + | </ | ||
| + | * Want to provide another ''/ | ||
| + | <file bash base-files-devel_3.0.14.bb> | ||
| + | require recipes-core/ | ||
| + | |||
| + | FILESEXTRAPATHS: | ||
| + | |||
| + | SUMMARY = "Devel version of base-files package." | ||
| + | |||
| + | RPROVIDES: | ||
| + | |||
| + | SRC_URI += " \ | ||
| + | file:// | ||
| + | " | ||
| + | |||
| + | do_install: | ||
| + | install -m 0644 ${WORKDIR}/ | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | |||
| + | |||