summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-02-15 22:56:13 -0600
committerSaul Wold <sgw@linux.intel.com>2011-02-16 07:34:51 -0800
commitab0e1bed22b5054db5a2b62862134ad3b0714181 (patch)
tree291945a5f5260eb8e75186b8f31af06a54761fc4 /meta
parent110f1f9418ba39ba4136d7aa7c3d52c2a10f47f0 (diff)
downloadpoky-ab0e1bed22b5054db5a2b62862134ad3b0714181.tar.gz
package_rpm: Fix solverdb generation
The RPM solverdb was potentially being generated multiple times. Fix this by ensuring we only process each directory once. Also correct an issue where the solution did not necessarily follow the preferred architecture ordering, reverse the default Poky ordering so that preferred is listed first. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/package_rpm.bbclass32
-rw-r--r--meta/classes/populate_sdk_rpm.bbclass7
-rw-r--r--meta/classes/rootfs_rpm.bbclass9
3 files changed, 28 insertions, 20 deletions
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 215be8d607..7cbdae6256 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -35,15 +35,22 @@ package_update_index_rpm () {
35 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then 35 if [ "$sdkarch" = "all" -o "$sdkarch" = "any" -o "$sdkarch" = "noarch" ]; then
36 extension="" 36 extension=""
37 fi 37 fi
38 packagedirs="$packagedirs ${DEPLOY_DIR_RPM}/$arch" 38 packagedirs="${DEPLOY_DIR_RPM}/$arch $packagedirs"
39 packagedirs_sdk="$packagedirs_sdk ${DEPLOY_DIR_RPM}/$sdkarch$extension" 39 packagedirs_sdk="${DEPLOY_DIR_RPM}/$sdkarch$extension $packagedirs_sdk"
40
41 rm -rf ${DEPLOY_DIR_RPM}/$arch/solvedb
42 rm -rf ${DEPLOY_DIR_RPM}/$sdkarch$extension/solvedb
40 done 43 done
41 44
42 cat /dev/null > ${RPMCONF_TARGET_BASE}.conf 45 cat /dev/null > ${RPMCONF_TARGET_BASE}.conf
43 for pkgdir in $packagedirs; do 46 for pkgdir in $packagedirs; do
44 if [ -e $pkgdir/ ]; then 47 if [ -e $pkgdir/ ]; then
45 echo "Generating solve db for $pkgdir..." 48 echo "Generating solve db for $pkgdir..."
46 rm -rf $pkgdir/solvedb 49 echo $pkgdir/solvedb >> ${RPMCONF_TARGET_BASE}.conf
50 if [ -d $pkgdir/solvedb ]; then
51 # We've already processed this and it's a duplicate
52 continue
53 fi
47 mkdir -p $pkgdir/solvedb 54 mkdir -p $pkgdir/solvedb
48 echo "# Dynamically generated solve manifest" >> $pkgdir/solvedb/manifest 55 echo "# Dynamically generated solve manifest" >> $pkgdir/solvedb/manifest
49 find $pkgdir -maxdepth 1 -type f >> $pkgdir/solvedb/manifest 56 find $pkgdir -maxdepth 1 -type f >> $pkgdir/solvedb/manifest
@@ -53,7 +60,6 @@ package_update_index_rpm () {
53 --ignoresize --nosignature --nodigest \ 60 --ignoresize --nosignature --nodigest \
54 -D "__dbi_txn create nofsync" \ 61 -D "__dbi_txn create nofsync" \
55 $pkgdir/solvedb/manifest 62 $pkgdir/solvedb/manifest
56 echo $pkgdir/solvedb >> ${RPMCONF_TARGET_BASE}.conf
57 fi 63 fi
58 done 64 done
59 65
@@ -61,7 +67,11 @@ package_update_index_rpm () {
61 for pkgdir in $packagedirs_sdk; do 67 for pkgdir in $packagedirs_sdk; do
62 if [ -e $pkgdir/ ]; then 68 if [ -e $pkgdir/ ]; then
63 echo "Generating solve db for $pkgdir..." 69 echo "Generating solve db for $pkgdir..."
64 rm -rf $pkgdir/solvedb 70 echo $pkgdir/solvedb >> ${RPMCONF_HOST_BASE}.conf
71 if [ -d $pkgdir/solvedb ]; then
72 # We've already processed this and it's a duplicate
73 continue
74 fi
65 mkdir -p $pkgdir/solvedb 75 mkdir -p $pkgdir/solvedb
66 echo "# Dynamically generated solve manifest" >> $pkgdir/solvedb/manifest 76 echo "# Dynamically generated solve manifest" >> $pkgdir/solvedb/manifest
67 find $pkgdir -maxdepth 1 -type f >> $pkgdir/solvedb/manifest 77 find $pkgdir -maxdepth 1 -type f >> $pkgdir/solvedb/manifest
@@ -71,7 +81,6 @@ package_update_index_rpm () {
71 --ignoresize --nosignature --nodigest \ 81 --ignoresize --nosignature --nodigest \
72 -D "__dbi_txn create nofsync" \ 82 -D "__dbi_txn create nofsync" \
73 $pkgdir/solvedb/manifest 83 $pkgdir/solvedb/manifest
74 echo $pkgdir/solvedb >> ${RPMCONF_HOST_BASE}.conf
75 fi 84 fi
76 done 85 done
77} 86}
@@ -146,8 +155,7 @@ resolve_package_rpm () {
146# install a bunch of packages using rpm 155# install a bunch of packages using rpm
147# the following shell variables needs to be set before calling this func: 156# the following shell variables needs to be set before calling this func:
148# INSTALL_ROOTFS_RPM - install root dir 157# INSTALL_ROOTFS_RPM - install root dir
149# INSTALL_PLATFORM_RPM - main platform 158# INSTALL_PLATFORM_RPM - extra platform
150# INSTALL_PLATFORM_EXTRA_RPM - extra platform
151# INSTALL_CONFBASE_RPM - configuration file base name 159# INSTALL_CONFBASE_RPM - configuration file base name
152# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed 160# INSTALL_PACKAGES_NORMAL_RPM - packages to be installed
153# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only 161# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
@@ -158,8 +166,7 @@ resolve_package_rpm () {
158package_install_internal_rpm () { 166package_install_internal_rpm () {
159 167
160 local target_rootfs="${INSTALL_ROOTFS_RPM}" 168 local target_rootfs="${INSTALL_ROOTFS_RPM}"
161 local platform="${INSTALL_PLATFORM_RPM}" 169 local platforms="${INSTALL_PLATFORM_RPM}"
162 local platform_extra="${INSTALL_PLATFORM_EXTRA_RPM}"
163 local confbase="${INSTALL_CONFBASE_RPM}" 170 local confbase="${INSTALL_CONFBASE_RPM}"
164 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}" 171 local package_to_install="${INSTALL_PACKAGES_NORMAL_RPM}"
165 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}" 172 local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
@@ -169,9 +176,8 @@ package_install_internal_rpm () {
169 176
170 # Setup base system configuration 177 # Setup base system configuration
171 mkdir -p ${target_rootfs}/etc/rpm/ 178 mkdir -p ${target_rootfs}/etc/rpm/
172 echo "${platform}-unknown-linux" >${target_rootfs}/etc/rpm/platform 179 if [ ! -z "$platforms" ]; then
173 if [ ! -z "$platform_extra" ]; then 180 for pt in $platforms ; do
174 for pt in $platform_extra ; do
175 echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform 181 echo "$pt-unknown-linux" >> ${target_rootfs}/etc/rpm/platform
176 done 182 done
177 fi 183 fi
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index e1abbad17b..d1797806e2 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -33,8 +33,7 @@ fakeroot populate_sdk_rpm () {
33 33
34 #install target 34 #install target
35 export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}" 35 export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
36 export INSTALL_PLATFORM_RPM="${TARGET_ARCH}" 36 export INSTALL_PLATFORM_RPM="${PACKAGE_ARCHS}"
37 export INSTALL_PLATFORM_EXTRA_RPM="${PACKAGE_ARCHS}"
38 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" 37 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
39 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}" 38 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_TARGET_TASK}"
40 39
@@ -46,7 +45,6 @@ fakeroot populate_sdk_rpm () {
46 export INSTALL_PLATFORM_RPM="${SDK_ARCH}" 45 export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
47 export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}" 46 export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}"
48 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}" 47 export INSTALL_PACKAGES_NORMAL_RPM="${TOOLCHAIN_HOST_TASK}"
49 INSTALL_PLATFORM_EXTRA_RPM=""
50 for arch in ${PACKAGE_ARCHS}; do 48 for arch in ${PACKAGE_ARCHS}; do
51 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'` 49 sdkarch=`echo $arch | sed -e 's/${HOST_ARCH}/${SDK_ARCH}/'`
52 extension="-nativesdk" 50 extension="-nativesdk"
@@ -54,10 +52,9 @@ fakeroot populate_sdk_rpm () {
54 extension="" 52 extension=""
55 fi 53 fi
56 if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then 54 if [ -e ${DEPLOY_DIR_RPM}/$sdkarch$extension ]; then
57 INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $sdkarch" 55 INSTALL_PLATFORM_RPM="$INSTALL_PLATFORM_RPM $sdkarch"
58 fi 56 fi
59 done 57 done
60 export INSTALL_PLATFORM_EXTRA_RPM
61 58
62 package_install_internal_rpm 59 package_install_internal_rpm
63 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM} 60 populate_sdk_post_rpm ${INSTALL_ROOTFS_RPM}
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 6fe11f77e4..a722e68ae1 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -48,8 +48,6 @@ fakeroot rootfs_rpm_do_rootfs () {
48 48
49 #install pacakges 49 #install pacakges
50 export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}" 50 export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}"
51 export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
52 export INSTALL_PLATFORM_EXTRA_RPM="${PACKAGE_ARCHS}"
53 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}" 51 export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
54 export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}" 52 export INSTALL_PACKAGES_NORMAL_RPM="${PACKAGE_INSTALL}"
55 export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}" 53 export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
@@ -57,6 +55,13 @@ fakeroot rootfs_rpm_do_rootfs () {
57 export INSTALL_PROVIDENAME_RPM="" 55 export INSTALL_PROVIDENAME_RPM=""
58 export INSTALL_TASK_RPM="populate_sdk" 56 export INSTALL_TASK_RPM="populate_sdk"
59 57
58 # List must be prefered to least preferred order
59 INSTALL_PLATFORM_RPM=""
60 for each_arch in ${PACKAGE_ARCHS} ; do
61 INSTALL_PLATFORM_RPM="$each_arch $INSTALL_PLATFORM_RPM"
62 done
63 export INSTALL_PLATFORM_RPM
64
60 package_install_internal_rpm 65 package_install_internal_rpm
61 66
62 export D=${IMAGE_ROOTFS} 67 export D=${IMAGE_ROOTFS}