[yocto] SRC_URI and appending and a "style guide"?

Jerrod Peach peachj at lexmark.com
Thu Dec 13 05:22:42 PST 2012


Robert,

For the specific topic of SRC_URI += vs. SRC_URI_append, I personally
prefer the former over the latter, but I'm not an expert by any means.

As for the topic of a style guide, such a thing already exists on the Wiki:
https://wiki.yoctoproject.org/wiki/Recipe_%26_Patch_Style_Guide.  That
would be the obvious place to put such a recommendation, if that is indeed
the consensus.

Kind regards,

Jerrod


On Wed, Dec 12, 2012 at 3:12 PM, Robert P. J. Day <rpjday at crashcourse.ca>wrote:

>
>   it's a pedantry-laden day today so i'm going to continue to whine
> about aesthetics.  what about a yocto style guide for coding style
> recommendations?  for example, consider the variations:
>
> poky/meta/recipes-support/libcroco/libcroco_0.6.3.bb:SRC_URI_append = "
> file://croco.patch;apply=yes \
> poky/meta/recipes-support/attr/ea-acl.inc:SRC_URI +=
> "file://relative-libdir.patch;striplevel=0 \
> poky/meta/recipes-support/db/db_5.3.15.bb:SRC_URI +=
> "file://arm-thumb-mutex_db5.patch;patchdir=.."
> poky/meta/recipes-sato/leafpad/leafpad_0.8.18.1.bb:SRC_URI_append_poky =
> " file://owl-menu.patch;apply=yes "
> poky/meta/recipes-sato/puzzles/oh-puzzles_git.bb:SRC_URI_append_poky = "
> file://oh-puzzles-owl-menu.patch;striplevel=0 "
>
>   in the above, you have three different variations for appending to
> SRC_URI.  i don't think it would be clear to a reader if there was any
> difference between "+=" and "_append", other than that "_append"
> forces you to add the space yourself while "+=" doesn't.  of course,
> "_append_poky" is self-explanatory.
>
>   so is there a *preferred* form for things like that?  is it written
> down somewhere?  should it be?  just because it works for perl doesn't
> always mean that "there's more than one way to do it" is a good idea.
> :-)
>
> rday
>
> --
>
> ========================================================================
> Robert P. J. Day                                 Ottawa, Ontario, CANADA
>                         http://crashcourse.ca
>
> Twitter:                                       http://twitter.com/rpjday
> LinkedIn:                               http://ca.linkedin.com/in/rpjday
> ========================================================================
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20121213/51643e7f/attachment.html>


More information about the yocto mailing list