summaryrefslogtreecommitdiff
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-02-09 14:09:18 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-04-27 16:21:22 +0100
commit3021136e7b42ab64ca16f30c88467c4b00d51ee0 (patch)
treeb97aed86663455715a3a4b59a84946424aca1620 /meta
parentff533176a875663be797058bc35fa8ff3f9f8147 (diff)
downloadopenembedded-core-3021136e7b42ab64ca16f30c88467c4b00d51ee0.tar.gz
openembedded-core-3021136e7b42ab64ca16f30c88467c4b00d51ee0.tar.bz2
openembedded-core-3021136e7b42ab64ca16f30c88467c4b00d51ee0.zip
package_rpm: Only rebuild the indexes if the packages have changed
This change farms the solvedb creation out to a separate script which handles creation of the index, only if mtime of any of the packages has changed. For a core-image-minimal set of rpm's this saves ~20s of a 45s rootfs build. For core-image-sato it saves 1 minute of a 5 minute rootfs build. The more packages in the system, the bigger the saving will be. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_rpm.bbclass18
1 files changed, 4 insertions, 14 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index d90976b65d..623069e377 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -40,12 +40,13 @@ package_update_index_rpm_common () {
rpmconf_base="$1"
shift
+ createdirs=""
for archvar in "$@"; do
eval archs=\${${archvar}}
packagedirs=""
for arch in $archs; do
packagedirs="${DEPLOY_DIR_RPM}/$arch $packagedirs"
- rm -rf ${DEPLOY_DIR_RPM}/$arch/solvedb
+ rm -rf ${DEPLOY_DIR_RPM}/$arch/solvedb.done
done
cat /dev/null > ${rpmconf_base}-${archvar}.conf
@@ -53,22 +54,11 @@ package_update_index_rpm_common () {
if [ -e $pkgdir/ ]; then
echo "Generating solve db for $pkgdir..."
echo $pkgdir/solvedb >> ${rpmconf_base}-${archvar}.conf
- if [ -d $pkgdir/solvedb ]; then
- # We've already processed this and it's a duplicate
- continue
- fi
- mkdir -p $pkgdir/solvedb
- echo "# Dynamically generated solve manifest" >> $pkgdir/solvedb/manifest
- find $pkgdir -maxdepth 1 -type f >> $pkgdir/solvedb/manifest
- ${RPM} -i --replacepkgs --replacefiles --oldpackage \
- -D "_dbpath $pkgdir/solvedb" --justdb \
- --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
- --ignoresize --nosignature --nodigest \
- -D "__dbi_txn create nofsync" \
- $pkgdir/solvedb/manifest
+ createdirs="$createdirs $pkgdir"
fi
done
done
+ rpm-createsolvedb.py "${RPM}" $createdirs
}
#