All of lore.kernel.org
 help / color / mirror / Atom feed
* why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
@ 2015-10-23 12:02 Robert P. J. Day
  2015-10-23 12:49 ` Paul Eggleton
  0 siblings, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2015-10-23 12:02 UTC (permalink / raw)
  To: OE Core mailing list


  side note: the first in a small set of posts where i simply want to
clarify minor oddities i run across in oe-core, not because they have
any desperate need to be fixed, but more because when i'm teaching
courses in oe/yocto, i run across the occasional weirdness that
puzzles students, and forces me to try to explain it, and sometimes
the explanation is, "that's just silly." so here's the first one.

  as i read in bitbake.conf, the default source directory for any
recipe is defined as:

  S = "${WORKDIR}/${BP}"

which suggests that, as long as processing a recipe ends up using that
value as the source directory, there is no need for a recipe to
redefine S. kind of obvious, no?

  in the case of sysfsutils-2.1.0.bb, one sees the line:

S = "${WORKDIR}/sysfsutils-${PV}"

which, given the standard definitions for variables BP and PV, seems
to expand into precisely the default value given in bitbake.conf.

  so, unless i'm missing something, is there any actual need for that
line in the sysfsutils recipe file? is there something more subtle
going on here that i don't understand?

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

* Re: why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
  2015-10-23 12:02 why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"? Robert P. J. Day
@ 2015-10-23 12:49 ` Paul Eggleton
  2015-10-23 12:57   ` Robert P. J. Day
  2015-10-26 10:23   ` Robert P. J. Day
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Eggleton @ 2015-10-23 12:49 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: openembedded-core

Hi Robert,

On Friday 23 October 2015 08:02:11 Robert P. J. Day wrote:
>   side note: the first in a small set of posts where i simply want to
> clarify minor oddities i run across in oe-core, not because they have
> any desperate need to be fixed, but more because when i'm teaching
> courses in oe/yocto, i run across the occasional weirdness that
> puzzles students, and forces me to try to explain it, and sometimes
> the explanation is, "that's just silly." so here's the first one.
> 
>   as i read in bitbake.conf, the default source directory for any
> recipe is defined as:
> 
>   S = "${WORKDIR}/${BP}"
> 
> which suggests that, as long as processing a recipe ends up using that
> value as the source directory, there is no need for a recipe to
> redefine S. kind of obvious, no?
> 
>   in the case of sysfsutils-2.1.0.bb, one sees the line:
> 
> S = "${WORKDIR}/sysfsutils-${PV}"
> 
> which, given the standard definitions for variables BP and PV, seems
> to expand into precisely the default value given in bitbake.conf.
> 
>   so, unless i'm missing something, is there any actual need for that
> line in the sysfsutils recipe file? is there something more subtle
> going on here that i don't understand?

I don't think so, it appears that line goes way back to the initial population 
of the repository. Looks like we could just drop it.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
  2015-10-23 12:49 ` Paul Eggleton
@ 2015-10-23 12:57   ` Robert P. J. Day
  2015-10-23 13:08     ` Paul Eggleton
  2015-10-26 10:23   ` Robert P. J. Day
  1 sibling, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2015-10-23 12:57 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Fri, 23 Oct 2015, Paul Eggleton wrote:

> Hi Robert,
>
> On Friday 23 October 2015 08:02:11 Robert P. J. Day wrote:
> >   side note: the first in a small set of posts where i simply want to
> > clarify minor oddities i run across in oe-core, not because they have
> > any desperate need to be fixed, but more because when i'm teaching
> > courses in oe/yocto, i run across the occasional weirdness that
> > puzzles students, and forces me to try to explain it, and sometimes
> > the explanation is, "that's just silly." so here's the first one.
> >
> >   as i read in bitbake.conf, the default source directory for any
> > recipe is defined as:
> >
> >   S = "${WORKDIR}/${BP}"
> >
> > which suggests that, as long as processing a recipe ends up using that
> > value as the source directory, there is no need for a recipe to
> > redefine S. kind of obvious, no?
> >
> >   in the case of sysfsutils-2.1.0.bb, one sees the line:
> >
> > S = "${WORKDIR}/sysfsutils-${PV}"
> >
> > which, given the standard definitions for variables BP and PV, seems
> > to expand into precisely the default value given in bitbake.conf.
> >
> >   so, unless i'm missing something, is there any actual need for that
> > line in the sysfsutils recipe file? is there something more subtle
> > going on here that i don't understand?
>
> I don't think so, it appears that line goes way back to the initial
> population of the repository. Looks like we could just drop it.

  thanks for the clarification. i realize that stuff like this is
annoyingly pedantic for developers and expert users, but it's
*exactly* the kind of thing students in my classes occasionally point
out and ask me to explain, and i stand there looking kind of baffled,
muttering, "what the hell ..."

  i'm about to update all my courseware so i'll just collect as many
of those as i can find and submit as a single patch.

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

* Re: why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
  2015-10-23 12:57   ` Robert P. J. Day
@ 2015-10-23 13:08     ` Paul Eggleton
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Eggleton @ 2015-10-23 13:08 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: openembedded-core

On Friday 23 October 2015 08:57:39 Robert P. J. Day wrote:
> On Fri, 23 Oct 2015, Paul Eggleton wrote:
> > Hi Robert,
> > 
> > On Friday 23 October 2015 08:02:11 Robert P. J. Day wrote:
> > >   side note: the first in a small set of posts where i simply want to
> > > 
> > > clarify minor oddities i run across in oe-core, not because they have
> > > any desperate need to be fixed, but more because when i'm teaching
> > > courses in oe/yocto, i run across the occasional weirdness that
> > > puzzles students, and forces me to try to explain it, and sometimes
> > > the explanation is, "that's just silly." so here's the first one.
> > > 
> > >   as i read in bitbake.conf, the default source directory for any
> > > 
> > > recipe is defined as:
> > >   S = "${WORKDIR}/${BP}"
> > > 
> > > which suggests that, as long as processing a recipe ends up using that
> > > value as the source directory, there is no need for a recipe to
> > > redefine S. kind of obvious, no?
> > > 
> > >   in the case of sysfsutils-2.1.0.bb, one sees the line:
> > > S = "${WORKDIR}/sysfsutils-${PV}"
> > > 
> > > which, given the standard definitions for variables BP and PV, seems
> > > to expand into precisely the default value given in bitbake.conf.
> > > 
> > >   so, unless i'm missing something, is there any actual need for that
> > > 
> > > line in the sysfsutils recipe file? is there something more subtle
> > > going on here that i don't understand?
> > 
> > I don't think so, it appears that line goes way back to the initial
> > population of the repository. Looks like we could just drop it.
> 
>   thanks for the clarification. i realize that stuff like this is
> annoyingly pedantic for developers and expert users, but it's
> *exactly* the kind of thing students in my classes occasionally point
> out and ask me to explain, and i stand there looking kind of baffled,
> muttering, "what the hell ..."

Indeed, having recently been in a classroom situation at the Yocto Project Dev 
Day (standing at the back helpling/heckling the presenter rather than teaching 
;) I know what you mean.

>   i'm about to update all my courseware so i'll just collect as many
> of those as i can find and submit as a single patch.

Great, thanks!

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
  2015-10-23 12:49 ` Paul Eggleton
  2015-10-23 12:57   ` Robert P. J. Day
@ 2015-10-26 10:23   ` Robert P. J. Day
  2015-10-26 10:34     ` Paul Eggleton
  1 sibling, 1 reply; 7+ messages in thread
From: Robert P. J. Day @ 2015-10-26 10:23 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Fri, 23 Oct 2015, Paul Eggleton wrote:

... me snipped ...

> I don't think so, it appears that line goes way back to the initial
> population of the repository. Looks like we could just drop it.

  it *looks* like there are a number of lines like that in oe-core
that are superfluous ... some samples (which i have not verified, i
just selected from brief visual inspection):

recipes-bsp/hostap/hostap-utils.inc:S = "${WORKDIR}/hostap-utils-${PV}"
recipes-bsp/pcmciautils/pcmciautils.inc:S = "${WORKDIR}/pcmciautils-${PV}"
recipes-connectivity/openssl/openssl.inc:S = "${WORKDIR}/openssl-${PV}"
recipes-core/sysvinit/sysvinit_2.88dsf.bb:S = "${WORKDIR}/sysvinit-${PV}"
recipes-core/glib-2.0/glib.inc:S = "${WORKDIR}/glib-${PV}"
recipes-core/sysfsutils/sysfsutils_2.1.0.bb:S = "${WORKDIR}/sysfsutils-${PV}"
recipes-devtools/mtools/mtools_3.9.9.bb:S = "${WORKDIR}/mtools-${PV}"
recipes-devtools/intltool/intltool.inc:S = "${WORKDIR}/intltool-${PV}"
recipes-devtools/git/git.inc:S = "${WORKDIR}/git-${PV}"
recipes-extended/psmisc/psmisc.inc:S = "${WORKDIR}/psmisc-${PV}"
recipes-extended/net-tools/net-tools_1.60-26.bb:S = "${WORKDIR}/net-tools-1.60"
recipes-gnome/gtk+/gtk+3_3.16.6.bb:S = "${WORKDIR}/gtk+-${PV}"
recipes-kernel/oprofile/oprofile_1.1.0.bb:S = "${WORKDIR}/oprofile-${PV}"
recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb:S = "${WORKDIR}/libid3tag-${PV}"
... etc etc ...

and probably lots more. do i have at least the right understanding
that any setting of S which eventally equates to
${WORKDIR}/${BPN}-${PV} serves no useful purpose? (not sure about
*-native recipes, though, i have to take a closer look at those to see
if they fit the pattern.)

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

* Re: why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
  2015-10-26 10:23   ` Robert P. J. Day
@ 2015-10-26 10:34     ` Paul Eggleton
  2015-10-26 10:40       ` Robert P. J. Day
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Eggleton @ 2015-10-26 10:34 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: openembedded-core

On Monday 26 October 2015 06:23:09 Robert P. J. Day wrote:
> On Fri, 23 Oct 2015, Paul Eggleton wrote:
> 
> ... me snipped ...
> 
> > I don't think so, it appears that line goes way back to the initial
> > population of the repository. Looks like we could just drop it.
> 
>   it *looks* like there are a number of lines like that in oe-core
> that are superfluous ... some samples (which i have not verified, i
> just selected from brief visual inspection):
> 
> recipes-bsp/hostap/hostap-utils.inc:S = "${WORKDIR}/hostap-utils-${PV}"
> recipes-bsp/pcmciautils/pcmciautils.inc:S = "${WORKDIR}/pcmciautils-${PV}"
> recipes-connectivity/openssl/openssl.inc:S = "${WORKDIR}/openssl-${PV}"
> recipes-core/sysvinit/sysvinit_2.88dsf.bb:S = "${WORKDIR}/sysvinit-${PV}"
> recipes-core/glib-2.0/glib.inc:S = "${WORKDIR}/glib-${PV}"
> recipes-core/sysfsutils/sysfsutils_2.1.0.bb:S =
> "${WORKDIR}/sysfsutils-${PV}" recipes-devtools/mtools/mtools_3.9.9.bb:S =
> "${WORKDIR}/mtools-${PV}" recipes-devtools/intltool/intltool.inc:S =
> "${WORKDIR}/intltool-${PV}" recipes-devtools/git/git.inc:S =
> "${WORKDIR}/git-${PV}"
> recipes-extended/psmisc/psmisc.inc:S = "${WORKDIR}/psmisc-${PV}"
> recipes-extended/net-tools/net-tools_1.60-26.bb:S =
> "${WORKDIR}/net-tools-1.60" 
> recipes-gnome/gtk+/gtk+3_3.16.6.bb:S =
> "${WORKDIR}/gtk+-${PV}"
> recipes-kernel/oprofile/oprofile_1.1.0.bb:S = "${WORKDIR}/oprofile-${PV}"
> recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb:S =
> "${WORKDIR}/libid3tag-${PV}" ... etc etc ...
> 
> and probably lots more. do i have at least the right understanding
> that any setting of S which eventally equates to
> ${WORKDIR}/${BPN}-${PV} serves no useful purpose? (not sure about
> *-native recipes, though, i have to take a closer look at those to see
> if they fit the pattern.)

Now, you really need to be careful with this - in some cases these files are 
included from other recipes where PN is not the same as it would be in the 
standard recipe; there it is deliberate and "cleaning it up" would actually 
break the other recipe. Additionally I can see above, net-tools isn't a 
candidate because the version part is not the same ("1.60" vs "1.60-26"). 
Every recipe will need to be checked.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre


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

* Re: why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"?
  2015-10-26 10:34     ` Paul Eggleton
@ 2015-10-26 10:40       ` Robert P. J. Day
  0 siblings, 0 replies; 7+ messages in thread
From: Robert P. J. Day @ 2015-10-26 10:40 UTC (permalink / raw)
  To: Paul Eggleton; +Cc: openembedded-core

On Mon, 26 Oct 2015, Paul Eggleton wrote:

> On Monday 26 October 2015 06:23:09 Robert P. J. Day wrote:
> > On Fri, 23 Oct 2015, Paul Eggleton wrote:
> >
> > ... me snipped ...
> >
> > > I don't think so, it appears that line goes way back to the initial
> > > population of the repository. Looks like we could just drop it.
> >
> >   it *looks* like there are a number of lines like that in oe-core
> > that are superfluous ... some samples (which i have not verified, i
> > just selected from brief visual inspection):
> >
> > recipes-bsp/hostap/hostap-utils.inc:S = "${WORKDIR}/hostap-utils-${PV}"
> > recipes-bsp/pcmciautils/pcmciautils.inc:S = "${WORKDIR}/pcmciautils-${PV}"
> > recipes-connectivity/openssl/openssl.inc:S = "${WORKDIR}/openssl-${PV}"
> > recipes-core/sysvinit/sysvinit_2.88dsf.bb:S = "${WORKDIR}/sysvinit-${PV}"
> > recipes-core/glib-2.0/glib.inc:S = "${WORKDIR}/glib-${PV}"
> > recipes-core/sysfsutils/sysfsutils_2.1.0.bb:S =
> > "${WORKDIR}/sysfsutils-${PV}" recipes-devtools/mtools/mtools_3.9.9.bb:S =
> > "${WORKDIR}/mtools-${PV}" recipes-devtools/intltool/intltool.inc:S =
> > "${WORKDIR}/intltool-${PV}" recipes-devtools/git/git.inc:S =
> > "${WORKDIR}/git-${PV}"
> > recipes-extended/psmisc/psmisc.inc:S = "${WORKDIR}/psmisc-${PV}"
> > recipes-extended/net-tools/net-tools_1.60-26.bb:S =
> > "${WORKDIR}/net-tools-1.60"
> > recipes-gnome/gtk+/gtk+3_3.16.6.bb:S =
> > "${WORKDIR}/gtk+-${PV}"
> > recipes-kernel/oprofile/oprofile_1.1.0.bb:S = "${WORKDIR}/oprofile-${PV}"
> > recipes-multimedia/libid3tag/libid3tag_0.15.1b.bb:S =
> > "${WORKDIR}/libid3tag-${PV}" ... etc etc ...
> >
> > and probably lots more. do i have at least the right understanding
> > that any setting of S which eventally equates to
> > ${WORKDIR}/${BPN}-${PV} serves no useful purpose? (not sure about
> > *-native recipes, though, i have to take a closer look at those to see
> > if they fit the pattern.)
>
> Now, you really need to be careful with this - in some cases these
> files are included from other recipes where PN is not the same as it
> would be in the standard recipe; there it is deliberate and
> "cleaning it up" would actually break the other recipe. Additionally
> I can see above, net-tools isn't a candidate because the version
> part is not the same ("1.60" vs "1.60-26"). Every recipe will need
> to be checked.

  oh, i realize this ... i did say that this was a very cursory list i
hadn't checked carefully yet. i may or may not do any of this cleanup,
i just wanted to make sure i was at least understanding the occasional
redundancy correctly.

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

end of thread, other threads:[~2015-10-26 10:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-23 12:02 why does sysfsutils-2.1.0.bb set S = "${WORKDIR}/sysfsutils-${PV}"? Robert P. J. Day
2015-10-23 12:49 ` Paul Eggleton
2015-10-23 12:57   ` Robert P. J. Day
2015-10-23 13:08     ` Paul Eggleton
2015-10-26 10:23   ` Robert P. J. Day
2015-10-26 10:34     ` Paul Eggleton
2015-10-26 10:40       ` 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.