2008-08-25 20:53:13 +00:00
|
|
|
#
|
|
|
|
# Creates a root filesystem out of rpm packages
|
|
|
|
#
|
|
|
|
|
2012-11-30 18:59:39 +00:00
|
|
|
ROOTFS_PKGMANAGE = "rpm smartpm"
|
2013-05-23 08:18:42 +00:00
|
|
|
ROOTFS_PKGMANAGE_BOOTSTRAP = "run-postinsts"
|
2011-07-07 16:39:32 +00:00
|
|
|
|
2012-11-30 18:59:39 +00:00
|
|
|
# Add 50Meg of extra space for Smart
|
2014-04-24 18:59:20 +00:00
|
|
|
IMAGE_ROOTFS_EXTRA_SPACE_append = "${@bb.utils.contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}"
|
2011-07-07 16:39:32 +00:00
|
|
|
|
2012-11-29 15:43:16 +00:00
|
|
|
# Smart is python based, so be sure python-native is available to us.
|
|
|
|
EXTRANATIVEPATH += "python-native"
|
|
|
|
|
2014-08-14 13:32:10 +00:00
|
|
|
# opkg is needed for update-alternatives
|
|
|
|
RPMROOTFSDEPENDS = "rpm-native:do_populate_sysroot \
|
|
|
|
rpmresolve-native:do_populate_sysroot \
|
|
|
|
python-smartpm-native:do_populate_sysroot \
|
|
|
|
createrepo-native:do_populate_sysroot \
|
|
|
|
opkg-native:do_populate_sysroot"
|
2008-10-31 16:23:11 +00:00
|
|
|
|
2014-08-14 13:32:10 +00:00
|
|
|
do_rootfs[depends] += "${RPMROOTFSDEPENDS}"
|
|
|
|
do_populate_sdk[depends] += "${RPMROOTFSDEPENDS}"
|
2011-01-18 10:00:29 +00:00
|
|
|
|
2008-08-25 20:53:13 +00:00
|
|
|
do_rootfs[recrdeptask] += "do_package_write_rpm"
|
2013-03-07 03:26:13 +00:00
|
|
|
rootfs_rpm_do_rootfs[vardepsexclude] += "BUILDNAME"
|
2014-02-27 20:20:38 +00:00
|
|
|
do_rootfs[vardeps] += "PACKAGE_FEED_URIS"
|
2008-08-25 20:53:13 +00:00
|
|
|
|
2010-10-07 14:41:17 +00:00
|
|
|
# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
|
|
|
|
# in ${DEPLOY_DIR_RPM}. This can be removed if package_update_index_rpm can be called concurrently
|
|
|
|
do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
|
2014-08-14 13:32:10 +00:00
|
|
|
do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
|
2010-10-07 14:41:17 +00:00
|
|
|
|
2008-10-07 16:47:22 +00:00
|
|
|
python () {
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
if d.getVar('BUILD_IMAGES_FROM_FEEDS', True):
|
|
|
|
flags = d.getVarFlag('do_rootfs', 'recrdeptask')
|
2008-10-07 16:47:22 +00:00
|
|
|
flags = flags.replace("do_package_write_rpm", "")
|
|
|
|
flags = flags.replace("do_deploy", "")
|
2009-11-10 14:55:23 +00:00
|
|
|
flags = flags.replace("do_populate_sysroot", "")
|
Convert to use direct access to the data store (instead of bb.data.*Var*())
This is the result of running the following over the metadata:
sed \
-e 's:bb.data.\(setVar([^,()]*,[^,()]*\), *\([^ )]*\) *):\2.\1):g' \
-e 's:bb.data.\(setVarFlag([^,()]*,[^,()]*,[^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^(), ]*\) *,\([^)]*\)):\2.\1,\3):g' \
-e 's:bb.data.\(getVarFlag([^,()]*,[^,()]*\), *\([^() ]*\) *):\2.\1):g' \
-e 's:bb.data.\(getVar([^,()]*\), *\([^) ]*\) *):\2.\1):g' \
-i `grep -ril bb.data *`
(From OE-Core rev: b22831fd63164c4db9c0b72934d7d734a6585251)
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2011-11-09 15:00:01 +00:00
|
|
|
d.setVarFlag('do_rootfs', 'recrdeptask', flags)
|
|
|
|
d.setVar('RPM_PREPROCESS_COMMANDS', '')
|
|
|
|
d.setVar('RPM_POSTPROCESS_COMMANDS', '')
|
2011-07-18 20:55:28 +00:00
|
|
|
|
2008-10-07 16:47:22 +00:00
|
|
|
}
|
2014-08-14 13:31:40 +00:00
|
|
|
# Smart is python based, so be sure python-native is available to us.
|
|
|
|
EXTRANATIVEPATH += "python-native"
|
|
|
|
|
|
|
|
rpmlibdir = "/var/lib/rpm"
|