[oe] RFC: "Virtual" native and sdk recipes
Robert Schuster
theBohemian at gmx.net
Wed Jan 14 00:03:39 UTC 2009
Hi Richard,
I somehow missed this thread.
Richard Purdie schrieb:
> Proposal Step A:
>
> Having to set:
>
> FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/foo-${PV}"
>
> and
>
> S = "${WORKDIR}/foo-${PV}
>
> is fairly pointless and it would be nice the the defaults just did the
> right thing.
>
> http://git.pokylinux.org/cgit.cgi/poky/commit/?h=experimental-virtualnative&id=b8f0510a5567f6d1b90934fe513fd40423f11086
>
> is a patch introducing BASEPN which is PN with a range of specified
> suffixes removed (-native, -cross-sdk, -cross, -sdk as specified by
> SPECIAL_PKGSUFFIX).
>
> FILESPATH and S can then be constructed with BASEPN instead of PN
> removing the need to need to hardcode them:
>
> http://git.pokylinux.org/cgit.cgi/poky/commit/?h=experimental-virtualnative&id=ed829661d51b8f23628e97404ed507c2e56d8495
>
> This reduces my hypothetical example to:
>
> foo/foo.inc:
>
> SRC_URI = "http://somwehere/${BASEPN}-${PV}.tar.bz2 \
> file://some.patch;patch=1"
> inherit autotools
>
> foo/foo-native_1.0.bb:
> require foo_${PV}.bb
> inherit native
>
> The above proposal is worthwhile in itself alone.
Like koen said we have something like this in OE already but your
implementation looks better:
a) BASEPN, BASEP instead of BPN, BP:
This is less prone to be confused with "B". Furthermore I just tried to
put the BPN code into my local Poky and it turned out that somehow BPN
and BP are not set by the 'base_package_name' although its the same code
as in OE's org.oe.dev. There not many packages in OE which use BPN/BP so
we can quickly rename those that do.
I use BP/BPN more extensively in Jalimo but I already have a patch to
fix this.
b) Use of SPECIAL_PKGSUFFIX variable to define known suffixes
In OE's implementation this is hardcoded in the function code. Not so
nice but heck I am no python coder. :$
Regards
Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20090114/2588084d/attachment-0002.sig>
More information about the Openembedded-devel
mailing list