aboutsummaryrefslogtreecommitdiffstats
path: root/meta/classes/populate_sdk_rpm.bbclass
diff options
context:
space:
mode:
authorPaul Eggleton <paul.eggleton@linux.intel.com>2012-11-29 15:43:16 +0000
committerSaul Wold <sgw@linux.intel.com>2012-12-14 15:17:18 -0800
commita726ae7c032fac1aa49ce34180fa2ed2dcaf87d3 (patch)
treefc8ff87e8fd1c323d1b99f516226b8ee4c794b67 /meta/classes/populate_sdk_rpm.bbclass
parent9efa0aa914cae9e13d90ddf99b482ccf0936573c (diff)
downloadopenembedded-core-contrib-a726ae7c032fac1aa49ce34180fa2ed2dcaf87d3.tar.gz
classes/*_rpm: integrate Smart into RPM filesystem construction
Use Smart to construct the root filesystem for images and the contents of SDKs rather than the custom scripts around rpm we had previously. This ensures the result when producing an updated image will be the same as upgrading to the same package versions from an older image on the target, as well as allowing us to remove a substantial amount of code making the rpm classes much easier to follow. Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>. SDK implementation and testing as well as a number of bugfixes from Mark Hatle <mark.hatle@windriver.com>. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/classes/populate_sdk_rpm.bbclass')
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass51
1 files changed, 13 insertions, 38 deletions
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index b5aa601f5d..d26867fa9a 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -1,10 +1,20 @@
+# Smart is python based, so be sure python-native is available to us.
+EXTRANATIVEPATH += "python-native"
+
do_populate_sdk[depends] += "rpm-native:do_populate_sysroot"
do_populate_sdk[depends] += "rpmresolve-native:do_populate_sysroot"
+do_populate_sdk[depends] += "python-smartpm-native:do_populate_sysroot"
+
+# Needed for update-alternatives
+do_populate_sdk[depends] += "opkg-native:do_populate_sysroot"
+
+# Creating the repo info in do_rootfs
do_populate_sdk[depends] += "createrepo-native:do_populate_sysroot"
+
do_populate_sdk[recrdeptask] += "do_package_write_rpm"
rpmlibdir = "/var/lib/rpm"
-RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'"
+RPMOPTS="--dbpath ${rpmlibdir}"
RPM="rpm ${RPMOPTS}"
do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
@@ -16,28 +26,24 @@ populate_sdk_post_rpm () {
# remove lock files
rm -f ${target_rootfs}/__db.*
- # Move manifests into the directory with the logs
- mv ${target_rootfs}/install/*.manifest ${T}/
-
# Remove all remaining resolver files
rm -rf ${target_rootfs}/install
+ rm -rf ${target_rootfs}/var/lib/smart
}
populate_sdk_rpm () {
package_update_index_rpm
- package_generate_rpm_conf
## install target ##
# This needs to work in the same way as rootfs_rpm.bbclass!
#
export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
- export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
export INSTALL_PACKAGES_RPM="${TOOLCHAIN_TARGET_TASK}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_TASK_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM=""
- export INSTALL_PROVIDENAME_RPM="/bin/sh /bin/bash /usr/bin/env /usr/bin/perl pkgconfig pkgconfig(pkg-config)"
+ export INSTALL_PROVIDENAME_RPM=""
export INSTALL_TASK_RPM="populate_sdk-target"
export INSTALL_COMPLEMENTARY_RPM=""
export INTERCEPT_DIR=${WORKDIR}/intercept_scripts
@@ -45,31 +51,6 @@ populate_sdk_rpm () {
# Setup base system configuration
mkdir -p ${INSTALL_ROOTFS_RPM}/etc/rpm/
- mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}
- mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}/log
- cat > ${INSTALL_ROOTFS_RPM}${rpmlibdir}/DB_CONFIG << EOF
-# ================ Environment
-set_data_dir .
-set_create_dir .
-set_lg_dir ./log
-set_tmp_dir ./tmp
-
-# -- thread_count must be >= 8
-set_thread_count 64
-
-# ================ Logging
-
-# ================ Memory Pool
-set_mp_mmapsize 268435456
-
-# ================ Locking
-set_lk_max_locks 16384
-set_lk_max_lockers 16384
-set_lk_max_objects 16384
-mutex_set_max 163840
-
-# ================ Replication
-EOF
# List must be prefered to least preferred order
INSTALL_PLATFORM_EXTRA_RPM=""
@@ -86,7 +67,6 @@ EOF
echo "Installing NATIVESDK packages"
export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}"
export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
- export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}"
export INSTALL_PACKAGES_RPM="${TOOLCHAIN_HOST_TASK}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_HOST_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM=""
@@ -114,11 +94,6 @@ EOF
rm -rf ${SDK_OUTPUT}/etc
populate_sdk_log_check populate_sdk
-
- # Workaround so the parser knows we need the resolve_package function!
- if false ; then
- resolve_package_rpm foo ${RPMCONF_TARGET_BASE}.conf || true
- fi
}
python () {