blob: d85d001a62b606a98077da787e7738c07e353149 [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
8# Add 50Meg of extra space for Smart
9IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}"
10
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"
25rootfs_rpm_do_rootfs[vardepsexclude] += "BUILDNAME"
26do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
27
28# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
29# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
30do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
31do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
32
33python () {
34 if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
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}
44# Smart is python based, so be sure python-native is available to us.
45EXTRANATIVEPATH += "python-native"
46
47rpmlibdir = "/var/lib/rpm"