blob: 6eccd5a95996aa1d66557cfcf4701ab93c051400 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001#
2# Copyright OpenEmbedded Contributors
3#
4# SPDX-License-Identifier: MIT
5#
6
7#
8# Creates a root filesystem out of rpm packages
9#
10
11ROOTFS_PKGMANAGE = "rpm dnf"
12
13# dnf is using our custom sysconfig module, and so will fail without these
14export STAGING_INCDIR
15export STAGING_LIBDIR
16
17# Add 100Meg of extra space for dnf
18IMAGE_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.
21EXTRANATIVEPATH += "python3-native"
22
23# opkg is needed for update-alternatives
24RPMROOTFSDEPENDS = "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
29do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
30do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
31
32do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa"
33do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
34
35python () {
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}