]> code.ossystems Code Review - openembedded-core.git/commitdiff
rpm: Flush old logs by change the DB_CONFIG
authorMei Lei <lei.mei@intel.com>
Thu, 17 Nov 2011 06:57:56 +0000 (14:57 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 24 Nov 2011 22:09:20 +0000 (22:09 +0000)
Fixes [YOCTO #1174]

Rpm logs will grow indefinitely, so change the config to flush those old logs.

Signed-off-by: Mei Lei <lei.mei@intel.com>
meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch [new file with mode: 0644]
meta/recipes-devtools/rpm/rpm_5.4.0.bb

diff --git a/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch b/meta/recipes-devtools/rpm/rpm/rpm-log-auto-rm.patch
new file mode 100644 (file)
index 0000000..aafa416
--- /dev/null
@@ -0,0 +1,12 @@
+diff --git a/rpmdb/DB_CONFIG.in b/rpmdb/DB_CONFIG.in
+index 8b94c94..e0b4689 100644
+--- a/rpmdb/DB_CONFIG.in
++++ b/rpmdb/DB_CONFIG.in
+@@ -4,6 +4,7 @@ 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
index f8fe836562a0f70d21d1aa0bd036199ad7f9057f..d14bce4b94fe7a598f0f4a483d9a69b94551a2c6 100644 (file)
@@ -45,11 +45,12 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
 extrarpmdeps = "python perl"
 extrarpmdeps_virtclass-native = "file-native"
-PR = "r23"
+PR = "r24"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
 SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;extract=rpm-5.4.0.tar.gz \
+          file://rpm-log-auto-rm.patch \
           file://perfile_rpmdeps.sh \
           file://rpm-autogen.patch \
           file://rpm-libsql-fix.patch \
@@ -192,6 +193,7 @@ FILES_${PN} = "${bindir}/rpm \
                ${libdir}/rpm/bin/rpmrepo \
                ${libdir}/rpm/bin/rpmspecdump \
                ${libdir}/rpm/bin/wget \
+               /var/lib/rpm \
                "
 
 #              ${libdir}/rpm/magic
@@ -208,7 +210,6 @@ FILES_${PN}-dbg += "${libdir}/rpm/.debug \
 FILES_${PN}-common = "${bindir}/rpm2cpio \
                ${bindir}/gendiff \
                /etc/rpm \
-               /var/lib/rpm \
                /var/spool/repackage \
                "