* what is meaning of "SRC_URI_append_whatever +=" ??
@ 2012-03-21 10:22 Robert P. J. Day
2012-03-21 10:28 ` Robert P. J. Day
0 siblings, 1 reply; 10+ messages in thread
From: Robert P. J. Day @ 2012-03-21 10:22 UTC (permalink / raw)
To: OE Core mailing list
still perusing the very basics of oe-core and grepping madly, came
across the following oddity:
$ grep -r SRC_URI_append *
... snip ...
bitbake/doc/manual/usermanual.xml:SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"</screen></para>
meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \
meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes "
... snip ...
AIUI, there are two (common) variations for extending SRC_URI. the
straightforward unconditional way:
SRC_URI += ... blah blah ...
or if you need to make it conditional, then there's
SRC_URI_append_thingy = "whatever"
so what's with the latter two entries above?
meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \
meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes "
is there some subtlety i'm missing here? why would one ever use
either of:
SRC_URI_append += "..." (looks redundant)
SRC_URI_append = "..." (why not just SRC_URI +=?)
can i just assume those are typoes?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:22 what is meaning of "SRC_URI_append_whatever +=" ?? Robert P. J. Day @ 2012-03-21 10:28 ` Robert P. J. Day 2012-03-21 10:46 ` Koen Kooi 2012-03-21 11:11 ` Phil Blundell 0 siblings, 2 replies; 10+ messages in thread From: Robert P. J. Day @ 2012-03-21 10:28 UTC (permalink / raw) To: OE Core mailing list On Wed, 21 Mar 2012, Robert P. J. Day wrote: > > still perusing the very basics of oe-core and grepping madly, came > across the following oddity: > > $ grep -r SRC_URI_append * > ... snip ... > bitbake/doc/manual/usermanual.xml:SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"</screen></para> > meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ > meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " > ... snip ... > > AIUI, there are two (common) variations for extending SRC_URI. the > straightforward unconditional way: > > SRC_URI += ... blah blah ... > > or if you need to make it conditional, then there's > > SRC_URI_append_thingy = "whatever" > > so what's with the latter two entries above? > > meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ > meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " > > is there some subtlety i'm missing here? why would one ever use > either of: > > SRC_URI_append += "..." (looks redundant) > SRC_URI_append = "..." (why not just SRC_URI +=?) > > can i just assume those are typoes? following up on my own post, i decided to scan the entire oe-core tree: $ grep -r "_append +=" * meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-dev_append += "${bindir}/rpcgen ${libdir}/*_nonshared.a \ meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-staticdev_append += "${libdir}/*.a ${base_libdir}/*.a" meta/recipes-graphics/xorg-lib/libxp_1.0.1.bb:CFLAGS_append += " -I ${S}/include/X11/XprintUtil -I ${S}/include/X11/extensions" $ and i thought i'd look for another pattern as well: $ grep -r "_append_.*+=" * meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemumips += " file://32bitBE-support.patch" meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemuppc += " file://32bitBE-support.patch" meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky += " file://owl-menu.patch;apply=yes " $ of course, if all of the above is perfectly valid, i'm going to be embarrassed. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:28 ` Robert P. J. Day @ 2012-03-21 10:46 ` Koen Kooi 2012-03-21 10:51 ` Graeme Gregory 2012-03-21 11:11 ` Phil Blundell 1 sibling, 1 reply; 10+ messages in thread From: Koen Kooi @ 2012-03-21 10:46 UTC (permalink / raw) To: Patches and discussions about the oe-core layer Op 21 mrt. 2012, om 11:28 heeft Robert P. J. Day het volgende geschreven: > On Wed, 21 Mar 2012, Robert P. J. Day wrote: > >> >> still perusing the very basics of oe-core and grepping madly, came >> across the following oddity: >> >> $ grep -r SRC_URI_append * >> ... snip ... >> bitbake/doc/manual/usermanual.xml:SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"</screen></para> >> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " >> ... snip ... >> >> AIUI, there are two (common) variations for extending SRC_URI. the >> straightforward unconditional way: >> >> SRC_URI += ... blah blah ... >> >> or if you need to make it conditional, then there's >> >> SRC_URI_append_thingy = "whatever" >> >> so what's with the latter two entries above? >> >> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " >> >> is there some subtlety i'm missing here? why would one ever use >> either of: >> >> SRC_URI_append += "..." (looks redundant) >> SRC_URI_append = "..." (why not just SRC_URI +=?) >> >> can i just assume those are typoes? > > following up on my own post, i decided to scan the entire oe-core > tree: > > $ grep -r "_append +=" * > meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ > meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-dev_append += "${bindir}/rpcgen ${libdir}/*_nonshared.a \ > meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-staticdev_append += "${libdir}/*.a ${base_libdir}/*.a" > meta/recipes-graphics/xorg-lib/libxp_1.0.1.bb:CFLAGS_append += " -I ${S}/include/X11/XprintUtil -I ${S}/include/X11/extensions" > $ > > and i thought i'd look for another pattern as well: > > $ grep -r "_append_.*+=" * > meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemumips += " file://32bitBE-support.patch" > meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemuppc += " file://32bitBE-support.patch" > meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky += " file://owl-menu.patch;apply=yes " > $ > > of course, if all of the above is perfectly valid, i'm going to be > embarrassed. AFAICT '_append +=' is completely bogus. regards, Koen ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:46 ` Koen Kooi @ 2012-03-21 10:51 ` Graeme Gregory 2012-03-21 11:25 ` Robert P. J. Day ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Graeme Gregory @ 2012-03-21 10:51 UTC (permalink / raw) To: openembedded-core On 21/03/2012 10:46, Koen Kooi wrote: > Op 21 mrt. 2012, om 11:28 heeft Robert P. J. Day het volgende geschreven: > >> On Wed, 21 Mar 2012, Robert P. J. Day wrote: >> >>> still perusing the very basics of oe-core and grepping madly, came >>> across the following oddity: >>> >>> $ grep -r SRC_URI_append * >>> ... snip ... >>> bitbake/doc/manual/usermanual.xml:SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"</screen></para> >>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >>> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " >>> ... snip ... >>> >>> AIUI, there are two (common) variations for extending SRC_URI. the >>> straightforward unconditional way: >>> >>> SRC_URI += ... blah blah ... >>> >>> or if you need to make it conditional, then there's >>> >>> SRC_URI_append_thingy = "whatever" >>> >>> so what's with the latter two entries above? >>> >>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >>> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " >>> >>> is there some subtlety i'm missing here? why would one ever use >>> either of: >>> >>> SRC_URI_append += "..." (looks redundant) >>> SRC_URI_append = "..." (why not just SRC_URI +=?) >>> >>> can i just assume those are typoes? >> following up on my own post, i decided to scan the entire oe-core >> tree: >> >> $ grep -r "_append +=" * >> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >> meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-dev_append += "${bindir}/rpcgen ${libdir}/*_nonshared.a \ >> meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-staticdev_append += "${libdir}/*.a ${base_libdir}/*.a" >> meta/recipes-graphics/xorg-lib/libxp_1.0.1.bb:CFLAGS_append += " -I ${S}/include/X11/XprintUtil -I ${S}/include/X11/extensions" >> $ >> >> and i thought i'd look for another pattern as well: >> >> $ grep -r "_append_.*+=" * >> meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemumips += " file://32bitBE-support.patch" >> meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemuppc += " file://32bitBE-support.patch" >> meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky += " file://owl-menu.patch;apply=yes " >> $ >> >> of course, if all of the above is perfectly valid, i'm going to be >> embarrassed. > > AFAICT '_append +=' is completely bogus. > I beleive its valid to do BLAH_append = "spanner" BLAH_append += "toolbox" then final result is BLAH_append variable is "spanner toolbox" then the overrides happen. Graeme ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:51 ` Graeme Gregory @ 2012-03-21 11:25 ` Robert P. J. Day 2012-03-21 12:08 ` Richard Purdie 2012-03-21 14:03 ` Chris Larson 2 siblings, 0 replies; 10+ messages in thread From: Robert P. J. Day @ 2012-03-21 11:25 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 21 Mar 2012, Graeme Gregory wrote: > I beleive its valid to do > > BLAH_append = "spanner" > BLAH_append += "toolbox" > > then final result is BLAH_append variable is "spanner toolbox" then > the overrides happen. admitting my ignorance of the mechanics of "_append", what would it then mean to do: BLAH_append = "spanner" ... snip ... BLAH_append = "toolbox" if, say, someone does that accidentally? and at this point, i will leave this in the hands of people much smarter than me and move on. it may very well be that all of the oddities i ran across are technically valid but, for the sake of someone perusing the source, they should probably be cleaned up to prevent confusion. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:51 ` Graeme Gregory 2012-03-21 11:25 ` Robert P. J. Day @ 2012-03-21 12:08 ` Richard Purdie 2012-03-21 14:03 ` Chris Larson 2 siblings, 0 replies; 10+ messages in thread From: Richard Purdie @ 2012-03-21 12:08 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 2012-03-21 at 10:51 +0000, Graeme Gregory wrote: > On 21/03/2012 10:46, Koen Kooi wrote: > > Op 21 mrt. 2012, om 11:28 heeft Robert P. J. Day het volgende geschreven: > > > >> On Wed, 21 Mar 2012, Robert P. J. Day wrote: > >> > >>> still perusing the very basics of oe-core and grepping madly, came > >>> across the following oddity: > >>> > >>> $ grep -r SRC_URI_append * > >>> ... snip ... > >>> bitbake/doc/manual/usermanual.xml:SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"</screen></para> > >>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ > >>> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " > >>> ... snip ... > >>> > >>> AIUI, there are two (common) variations for extending SRC_URI. the > >>> straightforward unconditional way: > >>> > >>> SRC_URI += ... blah blah ... > >>> > >>> or if you need to make it conditional, then there's > >>> > >>> SRC_URI_append_thingy = "whatever" > >>> > >>> so what's with the latter two entries above? > >>> > >>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ > >>> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " > >>> > >>> is there some subtlety i'm missing here? why would one ever use > >>> either of: > >>> > >>> SRC_URI_append += "..." (looks redundant) > >>> SRC_URI_append = "..." (why not just SRC_URI +=?) > >>> > >>> can i just assume those are typoes? > >> following up on my own post, i decided to scan the entire oe-core > >> tree: > >> > >> $ grep -r "_append +=" * > >> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ > >> meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-dev_append += "${bindir}/rpcgen ${libdir}/*_nonshared.a \ > >> meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-staticdev_append += "${libdir}/*.a ${base_libdir}/*.a" > >> meta/recipes-graphics/xorg-lib/libxp_1.0.1.bb:CFLAGS_append += " -I ${S}/include/X11/XprintUtil -I ${S}/include/X11/extensions" > >> $ > >> > >> and i thought i'd look for another pattern as well: > >> > >> $ grep -r "_append_.*+=" * > >> meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemumips += " file://32bitBE-support.patch" > >> meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemuppc += " file://32bitBE-support.patch" > >> meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky += " file://owl-menu.patch;apply=yes " > >> $ > >> > >> of course, if all of the above is perfectly valid, i'm going to be > >> embarrassed. > > > > AFAICT '_append +=' is completely bogus. > > > > I beleive its valid to do > > BLAH_append = "spanner" > BLAH_append += "toolbox" > > then final result is BLAH_append variable is "spanner toolbox" then the > overrides happen. However you will get the same result with: BLAH_append = "spanner" BLAH_append = "toolbox" since _append values do stack. Also, it would be "spannertoolbox", just to be really correct :). So the += is confusing but harmless. I'd also point out that: BLAH_append_qemumips = "spanner" BLAH_append_qemumips += "toolbox" is different to: BLAH_append_qemumips = "spanner" BLAH_append_qemumips = "toolbox" since the above will not stack, only raw _append values do. Cheers, Richard ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:51 ` Graeme Gregory 2012-03-21 11:25 ` Robert P. J. Day 2012-03-21 12:08 ` Richard Purdie @ 2012-03-21 14:03 ` Chris Larson 2012-03-21 15:05 ` Robert P. J. Day 2 siblings, 1 reply; 10+ messages in thread From: Chris Larson @ 2012-03-21 14:03 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, Mar 21, 2012 at 3:51 AM, Graeme Gregory <gg@slimlogic.co.uk> wrote: > On 21/03/2012 10:46, Koen Kooi wrote: >> Op 21 mrt. 2012, om 11:28 heeft Robert P. J. Day het volgende geschreven: >> >>> On Wed, 21 Mar 2012, Robert P. J. Day wrote: >>> >>>> still perusing the very basics of oe-core and grepping madly, came >>>> across the following oddity: >>>> >>>> $ grep -r SRC_URI_append * >>>> ... snip ... >>>> bitbake/doc/manual/usermanual.xml:SRC_URI_append_1.0.7+ = "file://some_patch_which_the_new_versions_need.patch;patch=1"</screen></para> >>>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >>>> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " >>>> ... snip ... >>>> >>>> AIUI, there are two (common) variations for extending SRC_URI. the >>>> straightforward unconditional way: >>>> >>>> SRC_URI += ... blah blah ... >>>> >>>> or if you need to make it conditional, then there's >>>> >>>> SRC_URI_append_thingy = "whatever" >>>> >>>> so what's with the latter two entries above? >>>> >>>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >>>> meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = " file://croco.patch;apply=yes " >>>> >>>> is there some subtlety i'm missing here? why would one ever use >>>> either of: >>>> >>>> SRC_URI_append += "..." (looks redundant) >>>> SRC_URI_append = "..." (why not just SRC_URI +=?) >>>> >>>> can i just assume those are typoes? >>> following up on my own post, i decided to scan the entire oe-core >>> tree: >>> >>> $ grep -r "_append +=" * >>> meta/recipes-support/gmp/gmp_5.0.4.bb:SRC_URI_append += "file://use-includedir.patch \ >>> meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-dev_append += "${bindir}/rpcgen ${libdir}/*_nonshared.a \ >>> meta/recipes-core/eglibc/eglibc-package.inc:FILES_${PN}-staticdev_append += "${libdir}/*.a ${base_libdir}/*.a" >>> meta/recipes-graphics/xorg-lib/libxp_1.0.1.bb:CFLAGS_append += " -I ${S}/include/X11/XprintUtil -I ${S}/include/X11/extensions" >>> $ >>> >>> and i thought i'd look for another pattern as well: >>> >>> $ grep -r "_append_.*+=" * >>> meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemumips += " file://32bitBE-support.patch" >>> meta/recipes-graphics/tslib/tslib_1.0.bb:SRC_URI_append_qemuppc += " file://32bitBE-support.patch" >>> meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky += " file://owl-menu.patch;apply=yes " >>> $ >>> >>> of course, if all of the above is perfectly valid, i'm going to be >>> embarrassed. >> >> AFAICT '_append +=' is completely bogus. >> > > I beleive its valid to do > > BLAH_append = "spanner" > BLAH_append += "toolbox" > > then final result is BLAH_append variable is "spanner toolbox" then the > overrides happen. No, sorry, it's still bogus. _append isn't part of the variable name, it's an operation. _append is *always* cumulative, so += is redundant, only being used to add the " " separator which you could add yourself just as easily. -- Christopher Larson ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 14:03 ` Chris Larson @ 2012-03-21 15:05 ` Robert P. J. Day 0 siblings, 0 replies; 10+ messages in thread From: Robert P. J. Day @ 2012-03-21 15:05 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 21 Mar 2012, Chris Larson wrote: ... snip ... > No, sorry, it's still bogus. _append isn't part of the variable > name, it's an operation. _append is *always* cumulative, so += is > redundant, only being used to add the " " separator which you could > add yourself just as easily. i believe my work here is done. :-) as i said before, i will now let the clever people sort this out. rday -- ======================================================================== Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ======================================================================== ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 10:28 ` Robert P. J. Day 2012-03-21 10:46 ` Koen Kooi @ 2012-03-21 11:11 ` Phil Blundell 2012-03-21 12:11 ` Richard Purdie 1 sibling, 1 reply; 10+ messages in thread From: Phil Blundell @ 2012-03-21 11:11 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 2012-03-21 at 06:28 -0400, Robert P. J. Day wrote: > of course, if all of the above is perfectly valid, i'm going to be > embarrassed. All the constructs you mentioned are syntactically valid, though it isn't clear that all of them are very useful. There is a subtle difference between SRC_URI_append = "..." and SRC_URI_append += "..." in that the latter will insert a space whereas the former will not. But I don't think there is any situation where this distinction serves any useful purpose. As far as I know, with current bitbake at least, SRC_URI = "a" SRC_URI_append = "b" SRC_URI_append += "c" and SRC_URI = "a" SRC_URI_append = "b" SRC_URI_append = " c" will both produce exactly the same effect, viz. SRC_URI = "ab c". I think it might have been the case with some older bitbakes that the middle line would have no effect in this situation but that doesn't appear to be true now. > SRC_URI_append = "..." (why not just SRC_URI +=?) There are two differences in behaviour between these two. First, trivially, _append doesn't add a space (i.e. it's closer to ".=" than "+="). Secondly, and more significantly, the effect of _append is delayed whereas the effect of +=/.= is immediate. So, given: SRC_URI_append = "b" SRC_URI = "a" you will get the result SRC_URI = "ab". Whereas if you had written: SRC_URI += "b" SRC_URI = "a" you would get SRC_URI = "a". There are places in the metadata that rely on these semantics, though in many ways this is unwholesome behaviour and it would be nice to eliminate the places where it is used. p. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: what is meaning of "SRC_URI_append_whatever +=" ?? 2012-03-21 11:11 ` Phil Blundell @ 2012-03-21 12:11 ` Richard Purdie 0 siblings, 0 replies; 10+ messages in thread From: Richard Purdie @ 2012-03-21 12:11 UTC (permalink / raw) To: Patches and discussions about the oe-core layer On Wed, 2012-03-21 at 11:11 +0000, Phil Blundell wrote: > On Wed, 2012-03-21 at 06:28 -0400, Robert P. J. Day wrote: > > of course, if all of the above is perfectly valid, i'm going to be > > embarrassed. > > All the constructs you mentioned are syntactically valid, though it > isn't clear that all of them are very useful. > > There is a subtle difference between SRC_URI_append = "..." and > SRC_URI_append += "..." in that the latter will insert a space whereas > the former will not. But I don't think there is any situation where > this distinction serves any useful purpose. As far as I know, with > current bitbake at least, > > SRC_URI = "a" > SRC_URI_append = "b" > SRC_URI_append += "c" > > and > > SRC_URI = "a" > SRC_URI_append = "b" > SRC_URI_append = " c" > > will both produce exactly the same effect, viz. SRC_URI = "ab c". I > think it might have been the case with some older bitbakes that the > middle line would have no effect in this situation but that doesn't > appear to be true now. > > > SRC_URI_append = "..." (why not just SRC_URI +=?) > I hadn't realised the += combined with append would insert a space although I can see why it would happen :) Cheers, Richard ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2012-03-21 15:14 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-21 10:22 what is meaning of "SRC_URI_append_whatever +=" ?? Robert P. J. Day 2012-03-21 10:28 ` Robert P. J. Day 2012-03-21 10:46 ` Koen Kooi 2012-03-21 10:51 ` Graeme Gregory 2012-03-21 11:25 ` Robert P. J. Day 2012-03-21 12:08 ` Richard Purdie 2012-03-21 14:03 ` Chris Larson 2012-03-21 15:05 ` Robert P. J. Day 2012-03-21 11:11 ` Phil Blundell 2012-03-21 12:11 ` Richard Purdie
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox