diff options
| author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-10 14:35:29 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-12 15:27:17 +0100 |
| commit | fd1517e2b51a170f2427122c6b95396db251d827 (patch) | |
| tree | dabfe3e631339c2fc99a9ee7febb0f9c128e325e /meta/classes-recipe/rootfs_rpm.bbclass | |
| parent | 10317912ee319ccf7f83605d438b5cbf9663f296 (diff) | |
| download | poky-fd1517e2b51a170f2427122c6b95396db251d827.tar.gz | |
classes: Update classes to match new bitbake class scope functionality
Move classes to classes-global or classes-recipe as appropriate to take
advantage of new bitbake functionality to check class scope/usage.
(From OE-Core rev: f5c128008365e141082c129417eb72d2751e8045)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes-recipe/rootfs_rpm.bbclass')
| -rw-r--r-- | meta/classes-recipe/rootfs_rpm.bbclass | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/meta/classes-recipe/rootfs_rpm.bbclass b/meta/classes-recipe/rootfs_rpm.bbclass new file mode 100644 index 0000000000..6eccd5a959 --- /dev/null +++ b/meta/classes-recipe/rootfs_rpm.bbclass | |||
| @@ -0,0 +1,45 @@ | |||
| 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 | |||
| 23 | # opkg is needed for update-alternatives | ||
| 24 | RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \ | ||
| 25 | dnf-native:do_populate_sysroot \ | ||
| 26 | createrepo-c-native:do_populate_sysroot \ | ||
| 27 | opkg-native:do_populate_sysroot" | ||
| 28 | |||
| 29 | do_rootfs[depends] += "${RPMROOTFSDEPENDS}" | ||
| 30 | do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}" | ||
| 31 | |||
| 32 | do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa" | ||
| 33 | do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS" | ||
| 34 | |||
| 35 | python () { | ||
| 36 | if d.getVar('BUILD_IMAGES_FROM_FEEDS'): | ||
| 37 | flags = d.getVarFlag('do_rootfs', 'recrdeptask') | ||
| 38 | flags = flags.replace("do_package_write_rpm", "") | ||
| 39 | flags = flags.replace("do_deploy", "") | ||
| 40 | flags = flags.replace("do_populate_sysroot", "") | ||
| 41 | d.setVarFlag('do_rootfs', 'recrdeptask', flags) | ||
| 42 | d.setVar('RPM_PREPROCESS_COMMANDS', '') | ||
| 43 | d.setVar('RPM_POSTPROCESS_COMMANDS', '') | ||
| 44 | |||
| 45 | } | ||
