Patchwork [6/9] rootfs_rpm.bbclass: Update database configuration file

login
register
mail settings
Submitter Mark Hatle
Date June 11, 2012, 6:18 p.m.
Message ID <f04f9ffc31a1ef108fbfd8c64f11cb39d7ae5773.1339438568.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/29677/
State New
Headers show

Comments

Mark Hatle - June 11, 2012, 6:18 p.m.
Move the creation of the database configuration files to just before we
perform the install actions.  This ensures they will exist even in SDK or
other non-target filesystem images.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 meta/classes/package_rpm.bbclass |   32 ++++++++++++++++++++++++++++++++
 meta/classes/rootfs_rpm.bbclass  |   31 -------------------------------
 2 files changed, 32 insertions(+), 31 deletions(-)

Patch

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 097fa12..b84c044 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -454,6 +454,38 @@  EOF
 
 	chmod 0755 ${WORKDIR}/scriptlet_wrapper
 
+	# Configure RPM... we enforce these settings!
+	mkdir -p ${target_rootfs}${rpmlibdir}
+	mkdir -p ${target_rootfs}${rpmlibdir}/log
+	# After change the __db.* cache size, log file will not be generated automatically,
+	# that will raise some warnings, so touch a bare log for rpm write into it.
+	touch ${target_rootfs}${rpmlibdir}/log/log.0000000001
+	cat > ${target_rootfs}${rpmlibdir}/DB_CONFIG << EOF
+# ================ Environment
+set_data_dir .
+set_create_dir .
+set_lg_dir ./log
+set_tmp_dir ./tmp
+set_flags db_log_autoremove on
+
+# -- thread_count must be >= 8
+set_thread_count 64
+
+# ================ Logging
+
+# ================ Memory Pool
+set_cachesize 0 1048576 0
+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
+
 	# RPM is special. It can't handle dependencies and preinstall scripts correctly. Its
 	# probably a feature. The only way to convince rpm to actually run the preinstall scripts 
 	# for base-passwd and shadow first before installing packages that depend on these packages 
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index eafb34b..202f9ce 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -59,37 +59,6 @@  fakeroot rootfs_rpm_do_rootfs () {
 	# Setup base system configuration
 	mkdir -p ${INSTALL_ROOTFS_RPM}/etc/rpm/
 
-	mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}
-	mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}/log
-	# After change the __db.* cache size, log file will not be generated automatically,
-	# that will raise some warnings, so touch a bare log for rpm write into it.
-	touch ${INSTALL_ROOTFS_RPM}${rpmlibdir}/log/log.0000000001
-	cat > ${INSTALL_ROOTFS_RPM}${rpmlibdir}/DB_CONFIG << EOF
-# ================ Environment
-set_data_dir .
-set_create_dir .
-set_lg_dir ./log
-set_tmp_dir ./tmp
-set_flags db_log_autoremove on
-
-# -- thread_count must be >= 8
-set_thread_count 64
-
-# ================ Logging
-
-# ================ Memory Pool
-set_cachesize 0 1048576 0
-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=""
 	for each_arch in ${MULTILIB_PACKAGE_ARCHS} ${PACKAGE_ARCHS}; do