From: Khem Raj <raj.khem@gmail.com>
To: openembedded-devel@lists.openembedded.org
Subject: Re: [RFC, PATCH] Make packaged-staging use more correct PSTAGE_PKGARCH
Date: Tue, 22 Jun 2010 07:47:59 -0700 [thread overview]
Message-ID: <20100622144759.GB32544@gmail.com> (raw)
In-Reply-To: <4C1FDFAE.8040704@mentor.com>
On (21/06/10 14:54), Tom Rini wrote:
> 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).
>
> This changes to ${PACKAGE_ARCH}-${HOST_SYS} for everything and
> reworks the opkg.conf we generate to add entries as needed.
>
> There is an alternative, suggested by Chris Larson, that we modify
> PSTAGE_PKGARCH in an anon python function so that we can avoid
> things like 'x86_64-x86_64-linux' in native packages and similar
> duplication in sdk packages, or otherwise be more dynamic (use
> HOST_OS instead of SYS and then catch the cross case, etc).
I think this approach sounds better having same arch repeated twice
would be confusing
>
> Signed-off-by: Tom Rini <tom_rini@mentor.com>
>
> diff --git a/classes/packaged-staging.bbclass
> b/classes/packaged-staging.bbclass
> index 8a98940..d6ac67b 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_SYS}"
> 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('_', '-')}"
> -148,15 +148,15 @@ 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
> fi
> + if [ -f $conffile -a `grep -q $arch $conffile;echo $?` -ne 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/
> fi
>
> --
> Tom Rini
> Mentor Graphics Corporation
>
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
next prev parent reply other threads:[~2010-06-22 15:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-21 21:54 [RFC, PATCH] Make packaged-staging use more correct PSTAGE_PKGARCH Tom Rini
2010-06-22 14:47 ` Khem Raj [this message]
2010-06-22 18:55 ` Tom Rini
2010-06-23 17:24 ` Khem Raj
2010-06-23 18:59 ` Chris Larson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100622144759.GB32544@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-devel@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox