blob: 37730a71044d3041feceb91d087cc869208d8466 [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001#
2# Creates a root filesystem out of rpm packages
3#
4
5ROOTFS_PKGMANAGE = "rpm smartpm"
6ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
7
Patrick Williamsc0f7c042017-02-23 20:41:17 -06008# Add 100Meg of extra space for Smart
9IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 102400", "" ,d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050010
11# Smart is python based, so be sure python-native is available to us.
12EXTRANATIVEPATH += "python-native"
13
14# opkg is needed for update-alternatives
15RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
16 rpmresolve-native:do_populate_sysroot \
17 python-smartpm-native:do_populate_sysroot \
18 createrepo-native:do_populate_sysroot \
19 opkg-native:do_populate_sysroot"
20
21do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
22do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
23
24do_rootfs[recrdeptask] += "do_package_write_rpm"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050025do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
26
Patrick Williamsc124f4f2015-09-15 14:41:29 -050027python () {
28 if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
Patrick Williamsd8c66bc2016-06-20 12:57:21 -050029 flags = d.getVarFlag('do_rootfs', 'recrdeptask', True)
Patrick Williamsc124f4f2015-09-15 14:41:29 -050030 flags = flags.replace("do_package_write_rpm", "")
31 flags = flags.replace("do_deploy", "")
32 flags = flags.replace("do_populate_sysroot", "")
33 d.setVarFlag('do_rootfs', 'recrdeptask', flags)
34 d.setVar('RPM_PREPROCESS_COMMANDS', '')
35 d.setVar('RPM_POSTPROCESS_COMMANDS', '')
36
37}
38# Smart is python based, so be sure python-native is available to us.
39EXTRANATIVEPATH += "python-native"
40
41rpmlibdir = "/var/lib/rpm"