blob: 51f89ea990239345004104e03a900f9cf9fa4a96 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# Creates a root filesystem out of rpm packages
3#
4
Brad Bishop6e60e8b2018-02-01 10:27:11 -05005ROOTFS_PKGMANAGE = "rpm dnf"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006
Brad Bishop6e60e8b2018-02-01 10:27:11 -05007# dnf is using our custom distutils, and so will fail without these
8export STAGING_INCDIR
9export STAGING_LIBDIR
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
Brad Bishop6e60e8b2018-02-01 10:27:11 -050011# Add 100Meg of extra space for dnf
12IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "dnf", " + 102400", "" ,d)}"
13
14# Dnf is python based, so be sure python3-native is available to us.
15EXTRANATIVEPATH += "python3-native"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050016
17# opkg is needed for update-alternatives
18RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
Brad Bishop6e60e8b2018-02-01 10:27:11 -050019 dnf-native:do_populate_sysroot \
20 createrepo-c-native:do_populate_sysroot \
Patrick Williamsc124f4f2015-09-15 14:41:29 -050021 opkg-native:do_populate_sysroot"
22
23do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
24do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
25
Brad Bishop1a4b7ee2018-12-16 17:11:34 -080026do_rootfs[recrdeptask] += "do_package_write_rpm do_package_qa"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
28
Patrick Williamsc124f4f2015-09-15 14:41:29 -050029python () {
Brad Bishop6e60e8b2018-02-01 10:27:11 -050030 if d.getVar('BUILD_IMAGES_FROM_FEEDS'):
31 flags = d.getVarFlag('do_rootfs', 'recrdeptask')
Patrick Williamsc124f4f2015-09-15 14:41:29 -050032 flags = flags.replace("do_package_write_rpm", "")
33 flags = flags.replace("do_deploy", "")
34 flags = flags.replace("do_populate_sysroot", "")
35 d.setVarFlag('do_rootfs', 'recrdeptask', flags)
36 d.setVar('RPM_PREPROCESS_COMMANDS', '')
37 d.setVar('RPM_POSTPROCESS_COMMANDS', '')
38
39}