Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 1 | # |
| 2 | # Copyright OpenEmbedded Contributors |
| 3 | # |
| 4 | # SPDX-License-Identifier: MIT |
| 5 | # |
| 6 | |
| 7 | # |
| 8 | # Creates a root filesystem out of rpm packages |
| 9 | # |
| 10 | |
| 11 | ROOTFS_PKGMANAGE = "rpm dnf" |
| 12 | |
| 13 | # dnf is using our custom sysconfig module, and so will fail without these |
| 14 | export STAGING_INCDIR |
| 15 | export STAGING_LIBDIR |
| 16 | |
| 17 | # Add 100Meg of extra space for dnf |
| 18 | IMAGE_ROOTFS_EXTRA_SPACE:append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "", d)}" |
| 19 | |
| 20 | # Dnf is python based, so be sure python3-native is available to us. |
| 21 | EXTRANATIVEPATH += "python3-native" |
| 22 | |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 23 | RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \ |
| 24 | dnf-native:do_populate_sysroot \ |
Andrew Geissler | 8f84068 | 2023-07-21 09:09:43 -0500 | [diff] [blame] | 25 | createrepo-c-native:do_populate_sysroot" |
Patrick Williams | 92b42cb | 2022-09-03 06:53:57 -0500 | [diff] [blame] | 26 | |
| 27 | do_rootfs[depends] += "${RPMROOTFSDEPENDS}" |
| 28 | do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}" |
| 29 | |
| 30 | do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa" |
| 31 | do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" |
| 32 | |
| 33 | python () { |
| 34 | if d.getVar('BUILD_IMAGES_FROM_FEEDS'): |
| 35 | flags = d.getVarFlag('do_rootfs', 'recrdeptask') |
| 36 | flags = flags.replace("do_package_write_rpm", "") |
| 37 | flags = flags.replace("do_deploy", "") |
| 38 | flags = flags.replace("do_populate_sysroot", "") |
| 39 | d.setVarFlag('do_rootfs', 'recrdeptask', flags) |
| 40 | d.setVar('RPM_PREPROCESS_COMMANDS', '') |
| 41 | d.setVar('RPM_POSTPROCESS_COMMANDS', '') |
| 42 | |
| 43 | } |