Skip to contentSkip to conversation

Please ensure you are using layout variables in recipes

DISCUSSION Joshua Lock 4 participants 6 messages Jan 25, 2011

lore
Share & tools
lore
#0 lore raw

Hi all,

When creating/editing recipes can we please ensure consistent use of layout variables, rather than absolute paths.

For example use:

${bindir}/foo
${datadir}/bar
and
${base_sbindir}/baz

rather than:

/usr/bin/foo
/usr/share/bar
and
/sbin/baz

The layout variables are defined in bitbake.conf and we should have pretty much everything we need there, if you feel some are missing please submit a patch (we've recently added some for cross and nativesdk use, for example).

Thanks,
Joshua

Signature · 2 lines
Joshua Lock
        Intel Open Source Technology Centre
#1 lore raw
Quoted 4 lines · Joshua Lock

Hi all,

When creating/editing recipes can we please ensure consistent use of layout variables, rather than absolute paths.

Hi Josh,

When I was putting together the mediatomb scripts I remember running into this. We typically have to write custom init scripts, for example, in order to deal with this as well as some other subtleties and assumptions made by the package init author. In these cases, it would be really useful to have a layer skeleton, which also included skeleton recipes, images, etc. All commented, complete with documentation links to aid people through the process. Seeing it all together in final form would go a long way to helping people get it right the first (or maybe the second) time. I've discussed this with Saul as well, maybe something we need to get on the schedule?

--
Darren

Quoted 22 lines

For example use:

${bindir}/foo
${datadir}/bar
and
${base_sbindir}/baz

rather than:

/usr/bin/foo
/usr/share/bar
and
/sbin/baz

The layout variables are defined in bitbake.conf and we should have pretty much everything we need there, if you feel some are missing please submit a patch (we've recently added some for cross and nativesdk use, for example).

Thanks,
Joshua

Signature · 3 lines
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
#2 lore raw
Quoted 8 lines · Darren Hart
Quoted 4 lines · Joshua Lock

Hi all,

When creating/editing recipes can we please ensure consistent use of layout variables, rather than absolute paths.

Hi Josh,

Quoted 10 lines

When I was putting together the mediatomb scripts I remember running into this. We typically have to write custom init scripts, for example, in order to deal with this as well as some other subtleties and assumptions made by the package init author. In these cases, it would be really useful to have a layer skeleton, which also included skeleton recipes, images, etc. All commented, complete with documentation links to aid people through the process. Seeing it all together in final form would go a long way to helping people get it right the first (or maybe the second) time. I've discussed this with Saul as well, maybe something we need to get on the schedule?

I was just proposing something similar. Of course all of our metadata should meet the same high standards but it would make sense to have somewhere to point at as the canonical example.

Scheduling time to work providing example definitely gets my backing.

Cheers,
Joshua

Signature · 2 lines
Joshua Lock
        Intel Open Source Technology Centre
#3 lore raw
Quoted 20 lines · Joshua Lock
Quoted 8 lines · Darren Hart
Quoted 4 lines · Joshua Lock

Hi all,

When creating/editing recipes can we please ensure consistent use of layout variables, rather than absolute paths.

Hi Josh,

Quoted 10 lines

When I was putting together the mediatomb scripts I remember running into this. We typically have to write custom init scripts, for example, in order to deal with this as well as some other subtleties and assumptions made by the package init author. In these cases, it would be really useful to have a layer skeleton, which also included skeleton recipes, images, etc. All commented, complete with documentation links to aid people through the process. Seeing it all together in final form would go a long way to helping people get it right the first (or maybe the second) time. I've discussed this with Saul as well, maybe something we need to get on the schedule?

Quoted 6 lines

I was just proposing something similar. Of course all of our metadata should meet the same high standards but it would make sense to have somewhere to point at as the canonical example.

Scheduling time to work providing example definitely gets my backing.

This is still on my radar, and was partly what I was thinking about this for my talk. I have been thinking about a Yocto Metadata Philosophy, that shares our update vision (based on some of the recent input) along with layer/recipe implementation and examples. We can add to this init scripts and other examples of commonly modified files.

Sau!

Quoted 2 lines

Cheers,
Joshua

#4 lore raw
In reply to Joshua Lock

Op 25 jan 2011, om 13:35 heeft Joshua Lock het volgende geschreven:

Quoted 19 lines

Hi all,

When creating/editing recipes can we please ensure consistent use of layout variables, rather than absolute paths.

For example use:

${bindir}/foo
${datadir}/bar
and
${base_sbindir}/baz

rather than:

/usr/bin/foo
/usr/share/bar
and
/sbin/baz

Quoted 4 lines

The layout variables are defined in bitbake.conf and we should have pretty much everything we need there, if you feel some are missing please submit a patch (we've recently added some for cross and nativesdk use, for example).

Some care needs to be taking with that, though, since things like initscripts, config files and udev rules might have the hardcoded paths inside. In OE the 'micro' distro sets $prefix to "" instead of "/usr", which uncovered a world of hurt. Adding a sed s:usr/bin:${bindir}:g -i initscript to do_install is an easy enough way to fix it :)

regards,

Koen

#5 lore raw
Quoted 26 lines · Koen Kooi

Op 25 jan 2011, om 13:35 heeft Joshua Lock het volgende geschreven:

Quoted 19 lines

Hi all,

When creating/editing recipes can we please ensure consistent use of layout variables, rather than absolute paths.

For example use:

${bindir}/foo
${datadir}/bar
and
${base_sbindir}/baz

rather than:

/usr/bin/foo
/usr/share/bar
and
/sbin/baz

Quoted 4 lines

The layout variables are defined in bitbake.conf and we should have pretty much everything we need there, if you feel some are missing please submit a patch (we've recently added some for cross and nativesdk use, for example).

Quoted 6 lines

Some care needs to be taking with that, though, since things like initscripts, config files and udev rules might have the hardcoded paths inside. In OE the 'micro' distro sets $prefix to "" instead of "/usr", which uncovered a world of hurt. Adding a sed s:usr/bin:${bindir}:g -i initscript to do_install is an easy enough way to fix it :)

Indeed, we have a few instances of that (particularly in meta-demo) - good shout on something to keep an eye out for.

Thanks,
Joshua

Signature · 2 lines
Joshua Lock
        Intel Open Source Technology Centre