blob: 55f1cc92ca93a3431940864d1553da95af250bf8 [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
Patrick Williams92b42cb2022-09-03 06:53:57 -050023RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
24 dnf-native:do_populate_sysroot \
Andrew Geissler8f840682023-07-21 09:09:43 -050025 createrepo-c-native:do_populate_sysroot"
Patrick Williams92b42cb2022-09-03 06:53:57 -050026
27do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
28do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
29
30do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa"
31do_rootfs[vardeps] += "PACKAGE_FEED_URIS PACKAGE_FEED_BASE_PATHS PACKAGE_FEED_ARCHS"
32
33python () {
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}