All of lore.kernel.org
 help / color / mirror / Atom feed
* oddities related to "_append" and "_prepend" in oe-core
@ 2012-06-20 12:14 Robert P. J. Day
  2012-06-20 12:24 ` Phil Blundell
  0 siblings, 1 reply; 6+ messages in thread
From: Robert P. J. Day @ 2012-06-20 12:14 UTC (permalink / raw)
  To: OE Core mailing list


  inspired by richard purdie's correction of my original patch, i did
a quick grep to see if i could find any oddities related, first, to
uses of "_append"; specifically, where the string being appended did
*not* start with a blank.  there are certainly proper examples of
that, say when one is appending to a path, or appending to a filename,
and so on where a blank would be *wrong*.

  but there also appear to be "errors", so here's the grep command and
its output:

$ grep -r "_append = \"[^ ]" *
meta/conf/bitbake.conf:DISTRO_FEATURES_append = "${@oe.utils.distro_features_backfill(d)}"
meta/recipes-devtools/gdb/gdb-cross-canadian.inc:EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
meta/recipes-devtools/prelink/prelink_git.bb:OVERRIDES_append = ":${TARGET_OS_ORIG}"
meta/recipes-devtools/gcc/gcc-cross-intermediate.inc:CROSS_TARGET_SYS_DIR_append = ".${PN}"
meta/recipes-devtools/gcc/gcc-cross-initial.inc:CROSS_TARGET_SYS_DIR_append = ".${PN}"
meta/recipes-core/uclibc/uclibc.inc:FILES_${PN}-dev_append = "\
meta/recipes-core/base-files/base-files_3.0.14.bb:docdir_append = "/${P}"
meta/recipes-core/eglibc/eglibc_2.15.bb:PR_append = "+svnr${SRCPV}"
meta/recipes-core/eglibc/eglibc_2.13.bb:PR_append = "+svnr${SRCPV}"
meta/classes/autotools.bbclass:# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"
meta/classes/useradd.bbclass:DEPENDS_append = "${USERADDDEPENDS}"
meta/classes/multilib.bbclass:PACKAGEFUNCS_append = "do_package_qa_multilib"
meta/classes/libc-package.bbclass:OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"
meta/classes/rootfs_rpm.bbclass:IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "zypper", " + 51200", "" ,d)}"
meta/classes/cross-canadian.bbclass:PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}"
$

  at the very least, the second line of output above seems incorrect:

meta/recipes-devtools/gdb/gdb-cross-canadian.inc:EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"

that *definitely* looks like it wants a leading blank, no?

  one can do the same with "_prepend" and missing trailing blanks, but
it's not quite as pleasant and i didn't see anything obviously amiss
there.

  thoughts?  longer post on appends and conditional appends coming
shortly.

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] 6+ messages in thread

* Re: oddities related to "_append" and "_prepend" in oe-core
  2012-06-20 12:14 oddities related to "_append" and "_prepend" in oe-core Robert P. J. Day
@ 2012-06-20 12:24 ` Phil Blundell
  2012-06-20 12:30   ` Paul Eggleton
                     ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Phil Blundell @ 2012-06-20 12:24 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2012-06-20 at 08:14 -0400, Robert P. J. Day wrote:
> inspired by richard purdie's correction of my original patch, i did
> a quick grep to see if i could find any oddities related, first, to
> uses of "_append"; specifically, where the string being appended did
> *not* start with a blank.  there are certainly proper examples of
> that, say when one is appending to a path, or appending to a filename,
> and so on where a blank would be *wrong*.
> 
>   but there also appear to be "errors", so here's the grep command and
> its output:
> 
> $ grep -r "_append = \"[^ ]" *
> meta/conf/bitbake.conf:DISTRO_FEATURES_append = "${@oe.utils.distro_features_backfill(d)}"

That one is probably ok.

> meta/recipes-devtools/gdb/gdb-cross-canadian.inc:EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"

That one is actually ok, since the old value of EXTRA_OECONF ends with
whitespace.  But it does look confusing, and there is no obvious reason
it couldn't be += instead.

> meta/recipes-devtools/prelink/prelink_git.bb:OVERRIDES_append = ":${TARGET_OS_ORIG}"

That is ok.  OVERRIDES is not space separated.

> meta/recipes-devtools/gcc/gcc-cross-intermediate.inc:CROSS_TARGET_SYS_DIR_append = ".${PN}"
> meta/recipes-devtools/gcc/gcc-cross-initial.inc:CROSS_TARGET_SYS_DIR_append = ".${PN}"

Those are ok.  They could perhaps be ".=" which might be more readable.

> meta/recipes-core/uclibc/uclibc.inc:FILES_${PN}-dev_append = "\

That is ok since the appended string does start with whitespace (on the
next line).

> meta/recipes-core/base-files/base-files_3.0.14.bb:docdir_append = "/${P}"

That is ok since it is a path.  It could probably be .= instead.

> meta/recipes-core/eglibc/eglibc_2.15.bb:PR_append = "+svnr${SRCPV}"
> meta/recipes-core/eglibc/eglibc_2.13.bb:PR_append = "+svnr${SRCPV}"

Those are ok but, again, could probably be .=.

> meta/classes/autotools.bbclass:# EXTRA_OECONF_append = "${@autotools_set_crosscompiling(d)}"

That one is a comment and can probably be deleted.

> meta/classes/useradd.bbclass:DEPENDS_append = "${USERADDDEPENDS}"

That one is probably ok, it depends what's in ${USERADDDEPENDS}.

> meta/classes/multilib.bbclass:PACKAGEFUNCS_append = "do_package_qa_multilib"

That one is a bit weird.  It looks broken but, presumably, it must work
otherwise someone would have noticed.  I don't know offhand what is
making it work.

> meta/classes/libc-package.bbclass:OVERRIDES_append = ":${TARGET_ARCH}-${TARGET_OS}"

That is ok, same as the other OVERRIDES above.

> meta/classes/rootfs_rpm.bbclass:IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "zypper", " + 51200", "" ,d)}"

That is ok.

> meta/classes/cross-canadian.bbclass:PATH_append = ":${TMPDIR}/sysroots/${HOST_ARCH}/${bindir_cross}"

That is ok.

p.





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: oddities related to "_append" and "_prepend" in oe-core
  2012-06-20 12:24 ` Phil Blundell
@ 2012-06-20 12:30   ` Paul Eggleton
  2012-06-20 12:33   ` Robert P. J. Day
  2012-06-20 15:41   ` Khem Raj
  2 siblings, 0 replies; 6+ messages in thread
From: Paul Eggleton @ 2012-06-20 12:30 UTC (permalink / raw)
  To: openembedded-core

On Wednesday 20 June 2012 13:24:13 Phil Blundell wrote:
> > meta/conf/bitbake.conf:DISTRO_FEATURES_append =
> > "${@oe.utils.distro_features_backfill(d)}"
>
> That one is probably ok.

FYI I designed that not to change DISTRO_FEATURES at all if there was nothing 
to add - oe.utils.distro_features_backfill() adds a leading space itself if it 
returns any items, so an explicit space is not needed or desirable in this 
instance.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: oddities related to "_append" and "_prepend" in oe-core
  2012-06-20 12:24 ` Phil Blundell
  2012-06-20 12:30   ` Paul Eggleton
@ 2012-06-20 12:33   ` Robert P. J. Day
  2012-06-20 15:41   ` Khem Raj
  2 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2012-06-20 12:33 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 20 Jun 2012, Phil Blundell wrote:

> On Wed, 2012-06-20 at 08:14 -0400, Robert P. J. Day wrote:
> > inspired by richard purdie's correction of my original patch, i did
> > a quick grep to see if i could find any oddities related, first, to
> > uses of "_append"; specifically, where the string being appended did
> > *not* start with a blank.  there are certainly proper examples of
> > that, say when one is appending to a path, or appending to a filename,
> > and so on where a blank would be *wrong*.
> >
> >   but there also appear to be "errors", so here's the grep command and
> > its output:
> >
> > $ grep -r "_append = \"[^ ]" *
> > meta/conf/bitbake.conf:DISTRO_FEATURES_append = "${@oe.utils.distro_features_backfill(d)}"
>
> That one is probably ok.
>
> > meta/recipes-devtools/gdb/gdb-cross-canadian.inc:EXTRA_OECONF_append = "--with-python=${WORKDIR}/python"
>
> That one is actually ok, since the old value of EXTRA_OECONF ends with
> whitespace.  But it does look confusing, and there is no obvious reason
> it couldn't be += instead.

... big snip ...

  just to be awesomely clear as to what i'm trying to do here, i
realize that a lot of what i'm picking on is perfectly valid and
works.  but in trying to lash together at least an intro tutorial on
oe-core, i want to be able to say, "let's look at how it's done in the
source," without having to constantly explain how there are different
ways to do exactly the same thing without confusing the reader any
further.

  as i said, i'm trying to codify "best practices."  boy, a style
guide sure would come in handy. :-)

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] 6+ messages in thread

* Re: oddities related to "_append" and "_prepend" in oe-core
  2012-06-20 12:24 ` Phil Blundell
  2012-06-20 12:30   ` Paul Eggleton
  2012-06-20 12:33   ` Robert P. J. Day
@ 2012-06-20 15:41   ` Khem Raj
  2012-06-20 16:28     ` Robert P. J. Day
  2 siblings, 1 reply; 6+ messages in thread
From: Khem Raj @ 2012-06-20 15:41 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, Jun 20, 2012 at 5:24 AM, Phil Blundell <philb@gnu.org> wrote:
>> meta/classes/multilib.bbclass:PACKAGEFUNCS_append = "do_package_qa_multilib"
>
> That one is a bit weird.  It looks broken but, presumably, it must work
> otherwise someone would have noticed.  I don't know offhand what is
> making it work.

insane.bbclass:PACKAGEFUNCS += " do_package_qa "

and it gets appended after that so it works, but I think adding a
space in the append
above is a wise thing to do.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: oddities related to "_append" and "_prepend" in oe-core
  2012-06-20 15:41   ` Khem Raj
@ 2012-06-20 16:28     ` Robert P. J. Day
  0 siblings, 0 replies; 6+ messages in thread
From: Robert P. J. Day @ 2012-06-20 16:28 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

[-- Attachment #1: Type: TEXT/PLAIN, Size: 1172 bytes --]

On Wed, 20 Jun 2012, Khem Raj wrote:

> On Wed, Jun 20, 2012 at 5:24 AM, Phil Blundell <philb@gnu.org> wrote:
> >> meta/classes/multilib.bbclass:PACKAGEFUNCS_append = "do_package_qa_multilib"
> >
> > That one is a bit weird.  It looks broken but, presumably, it must work
> > otherwise someone would have noticed.  I don't know offhand what is
> > making it work.
>
> insane.bbclass:PACKAGEFUNCS += " do_package_qa "
>
> and it gets appended after that so it works, but I think adding a
> space in the append above is a wise thing to do.

  that is *exactly* the kind of thing that makes using oe-core code
examples such a minefield.  nothing personal.  :-)

  perhaps i'll start collecting style guide suggestions.

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] 6+ messages in thread

end of thread, other threads:[~2012-06-20 16:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-20 12:14 oddities related to "_append" and "_prepend" in oe-core Robert P. J. Day
2012-06-20 12:24 ` Phil Blundell
2012-06-20 12:30   ` Paul Eggleton
2012-06-20 12:33   ` Robert P. J. Day
2012-06-20 15:41   ` Khem Raj
2012-06-20 16:28     ` Robert P. J. Day

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.