summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2010-06-23 10:44:40 -0700
committerTom Rini <tom_rini@mentor.com>2010-06-23 12:36:06 -0700
commitc402cf9096a72e0c2d899d2c131327d2366a418c (patch)
treea4d247c55a1ed809a62b8429e1af9cab44171bd6 /classes
parent3c655e5663f57d28cb285fe159804c2185f62764 (diff)
packaged-staging.bbclass: Change PSTAGE_PKGARCH to something dynamic
Currently, we make all pstage packages be locked to BUILD_SYS which causes annoying warnings in some cases and doesn't allow for sharing between say 32 and 64bit (which is valid for target bits). We now change to ${PACKAGE_ARCH}-${HOST_OS} for everything except for cross where we need to encode HOST_SYS into the name as well. Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Tom Rini <tom_rini@mentor.com>
Diffstat (limited to 'classes')
-rw-r--r--classes/packaged-staging.bbclass19
1 files changed, 12 insertions, 7 deletions
diff --git a/classes/packaged-staging.bbclass b/classes/packaged-staging.bbclass
index 09e86ae99e..670fd1c5db 100644
--- a/classes/packaged-staging.bbclass
+++ b/classes/packaged-staging.bbclass
@@ -12,7 +12,7 @@
# bitbake.conf set PSTAGING_ACTIVE = "0", this class sets to "1" if we're active
#
PSTAGE_PKGVERSION = "${PV}-${PR}"
-PSTAGE_PKGARCH = "${BUILD_SYS}"
+PSTAGE_PKGARCH = "${PACKAGE_ARCH}-${HOST_OS}"
PSTAGE_EXTRAPATH ?= "/${OELAYOUT_ABI}/${DISTRO_PR}/"
PSTAGE_PKGPATH = "${DISTRO}${PSTAGE_EXTRAPATH}"
PSTAGE_PKGPN = "${@bb.data.expand('staging-${PN}-${MULTIMACH_ARCH}${TARGET_VENDOR}-${TARGET_OS}', d).replace('_', '-')}"
@@ -28,6 +28,12 @@ PSTAGE_NATIVEDEPENDS = "\
BB_STAMP_WHITELIST = "${PSTAGE_NATIVEDEPENDS}"
+python __anonymous() {
+ # We need PSTAGE_PKGARCH to contain information about the target.
+ if bb.data.inherits_class('cross', d):
+ bb.data.setVar('PSTAGE_PKGARCH', "${HOST_SYS}-${PACKAGE_ARCH}-${TARGET_OS}", d)
+}
+
python () {
pstage_allowed = True
@@ -148,14 +154,13 @@ staging_helper () {
# Assemble appropriate opkg.conf
conffile=${PSTAGE_MACHCONFIG}
mkdir -p ${PSTAGE_WORKDIR}/pstaging_lists
+ arch="${PSTAGE_PKGARCH}"
if [ ! -e $conffile ]; then
- ipkgarchs="${BUILD_SYS}"
- priority=1
- for arch in $ipkgarchs; do
- echo "arch $arch $priority" >> $conffile
- priority=$(expr $priority + 5)
- done
+ echo "arch $arch 1" > $conffile
echo "dest root /" >> $conffile
+ elif [ `grep -c " $arch " $conffile` -eq 0 ]; then
+ priority=$(expr `grep -cE "^arch" $conffile` + 1)
+ sed -i -e "/dest/iarch $arch $priority" $conffile
fi
if [ ! -e ${TMPDIR}${libdir_native}/opkg/info/ ]; then
mkdir -p ${TMPDIR}${libdir_native}/opkg/info/