Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | # |
| 2 | # Creates a root filesystem out of rpm packages |
| 3 | # |
| 4 | |
| 5 | ROOTFS_PKGMANAGE = "rpm smartpm" |
| 6 | ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts" |
| 7 | |
| 8 | # Add 50Meg of extra space for Smart |
| 9 | IMAGE_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. |
| 12 | EXTRANATIVEPATH += "python-native" |
| 13 | |
| 14 | # opkg is needed for update-alternatives |
| 15 | RPMROOTFSDEPENDS = "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 | |
| 21 | do_rootfs[depends] += "${RPMROOTFSDEPENDS}" |
| 22 | do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}" |
| 23 | |
| 24 | do_rootfs[recrdeptask] += "do_package_write_rpm" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | do_rootfs[vardeps] += "PACKAGE_FEED_URIS" |
| 26 | |
| 27 | # RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files |
| 28 | # in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently |
| 29 | do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock" |
| 30 | do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock" |
| 31 | |
| 32 | python () { |
| 33 | if d.getVar('BUILD_IMAGES_FROM_FEEDS', True): |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame^] | 34 | flags = d.getVarFlag('do_rootfs', 'recrdeptask', True) |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 35 | flags = flags.replace("do_package_write_rpm", "") |
| 36 | flags = flags.replace("do_deploy", "") |
| 37 | flags = flags.replace("do_populate_sysroot", "") |
| 38 | d.setVarFlag('do_rootfs', 'recrdeptask', flags) |
| 39 | d.setVar('RPM_PREPROCESS_COMMANDS', '') |
| 40 | d.setVar('RPM_POSTPROCESS_COMMANDS', '') |
| 41 | |
| 42 | } |
| 43 | # Smart is python based, so be sure python-native is available to us. |
| 44 | EXTRANATIVEPATH += "python-native" |
| 45 | |
| 46 | rpmlibdir = "/var/lib/rpm" |