summaryrefslogtreecommitdiffstats
path: root/meta/classes/package_rpm.bbclass
diff options
context:
space:
mode:
authorMark Hatle <mhatle@windriver.com>2010-08-21 22:44:21 -0700
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-23 20:56:47 +0100
commit59a3e98b044d3157e7472d35b1439a4a292c6693 (patch)
tree9562b2daac52cfea6b35a8733f067228b75f5ed2 /meta/classes/package_rpm.bbclass
parent55a046bd4c4bf6e8ebb41a68205f46795f56fdbc (diff)
downloadpoky-59a3e98b044d3157e7472d35b1439a4a292c6693.tar.gz
rootfs_rpm: Enable multi dep solverdbs
Update package_rpm.bbclass to generate dep solver databases for each package arch. Following the example of the deb and ipk integration Revise the rootfs_rpm to solve the installation based on the multiple dep solvers. Note, recommends, locale and attemptonly pckages are still to be implemented. Signed-off-by: Mark Hatle <mhatle@windriver.com>
Diffstat (limited to 'meta/classes/package_rpm.bbclass')
-rw-r--r--meta/classes/package_rpm.bbclass51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 3334c9ae6a..f89fd94728 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -15,6 +15,57 @@ python package_rpm_install () {
15 bb.fatal("package_rpm_install not implemented!") 15 bb.fatal("package_rpm_install not implemented!")
16} 16}
17 17
18#
19# Update the Packages depsolver db in ${DEPLOY_DIR_RPM}
20#
21package_update_index_rpm () {
22 rpmarchs="${PACKAGE_ARCHS}"
23
24 if [ ! -z "${DEPLOY_KEEP_PACKAGES}" ]; then
25 return
26 fi
27
28 packagedirs=""
29 for arch in $rpmarchs ; do
30 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
31 packagedirs="$packagedirs ${DEPLOY_DIR_RPM}/$arch ${DEPLOY_DIR_RPM}/$sdkarch-nativesdk"
32 done
33
34 packagedirs="$packagedirs ${DEPLOY_DIR_RPM}/${SDK_ARCH}-${TARGET_ARCH}-canadian"
35
36 cat /dev/null > ${DEPLOY_DIR_RPM}/solvedb.conf
37 for pkgdir in $packagedirs; do
38 if [ -e $pkgdir/ ]; then
39 rm -rf $pkgdir/solvedb
40 mkdir -p $pkgdir/solvedb
41 echo "# Dynamically generated solve manifest" >> $pkgdir/solvedb/manifest
42 find $pkgdir -maxdepth 1 -type f >> $pkgdir/solvedb/manifest
43 ${RPM} -i --replacepkgs --replacefiles --oldpackage \
44 -D "_dbpath $pkgdir/solvedb" --justdb \
45 --noaid --nodeps --noorder --noscripts --notriggers --noparentdirs --nolinktos --stats \
46 $pkgdir/solvedb/manifest
47 echo $pkgdir/solvedb >> ${DEPLOY_DIR_RPM}/solvedb.conf
48 fi
49 done
50}
51
52#
53# Generate an rpm configuration suitable for use against the
54# generated depsolver db's...
55#
56package_generate_rpm_conf () {
57 printf "_solve_dbpath " > ${DEPLOY_DIR_RPM}/solvedb.macro
58 colon=false
59 for each in `cat ${DEPLOY_DIR_RPM}/solvedb.conf` ; do
60 if [ "$colon" == true ]; then
61 printf ":" >> ${DEPLOY_DIR_RPM}/solvedb.macro
62 fi
63 printf "%s" $each >> ${DEPLOY_DIR_RPM}/solvedb.macro
64 colon=true
65 done
66 printf "\n" >> ${DEPLOY_DIR_RPM}/solvedb.macro
67}
68
18python write_specfile () { 69python write_specfile () {
19 # We need to change '-' in a version field to '+' 70 # We need to change '-' in a version field to '+'
20 # This needs to be done BEFORE the mapping_rename_hook 71 # This needs to be done BEFORE the mapping_rename_hook