Skip to contentSkip to conversation

Incorrect FILESPATH usages

DISCUSSION Gary Thomas 3 participants 3 messages Apr 6, 2013

lore
Share & tools
lore
#0 lore raw

I have run across a problem where a main recipe is written in such a way that makes using .bbappend impossible. This happens if the main recipe has an explicit assignment for FILESPATH. In this case, the .bbappend is unable to add to that path, e.g. to add a machine specific patch, etc.

I found all of these in the current meta-data:

  gthomas@zeus:/local/poky-cutting-edge$ find meta -type f | grep -v ' ' | xargs grep ^FILESPATH
  meta/classes/base.bbclass:FILESPATH = "${@base_set_filespath(["${FILE_DIRNAME}/${BP}", "${FILE_DIRNAME}/${BPN}", "${FILE_DIRNAME}/files"], d)}"
  meta/recipes-devtools/linuxdoc-tools/linuxdoc-tools-native_0.9.66.bb:FILESPATH = "${FILE_DIRNAME}/linuxdoc-tools-native/"
  meta/recipes-devtools/python/python-pygobject_2.27.91.bb:FILESPATH = "${FILE_DIRNAME}/python-pygobject:${FILE_DIRNAME}/files"
  meta/recipes-devtools/python/python-native_2.7.3.bb:FILESPATH = "${FILE_DIRNAME}/python-native/:${FILE_DIRNAME}/python/"
  meta/recipes-devtools/gcc/gcc-4.7.inc:FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/gcc-4.7' ], d)}"
  meta/recipes-devtools/qemu/qemu-helper-native_1.0.bb:FILESPATH = "${FILE_DIRNAME}/qemu-helper"
  meta/recipes-devtools/qemu/nativesdk-qemu-helper_1.0.bb:FILESPATH = "${FILE_DIRNAME}/qemu-helper"
  meta/recipes-devtools/squashfs-tools/squashfs-tools_4.2.bb:FILESPATHPKG =. "squashfs-tools-${PV}:"
  meta/recipes-devtools/cdrtools/cdrtools-native_2.01.bb:FILESPATH = "${FILE_DIRNAME}/cdrtools-native/"
  meta/recipes-devtools/icecc-create-env/icecc-create-env-native_0.1.bb:FILESPATH = "${FILE_DIRNAME}/${PN}/"
  meta/recipes-graphics/clutter/cogl.inc:FILESPATH = "${FILE_DIRNAME}/cogl"
  meta/recipes-graphics/clutter/clutter-gst.inc:FILESPATH = "${FILE_DIRNAME}/clutter-gst"
  meta/recipes-graphics/clutter/clutter.inc:FILESPATH = "${FILE_DIRNAME}/clutter"
  meta/recipes-graphics/clutter/clutter-gtk.inc:FILESPATH = "${FILE_DIRNAME}/clutter-gtk"
  meta/recipes-graphics/xorg-lib/libx11.inc:FILESPATH = "${FILE_DIRNAME}/libx11"
  meta/recipes-bsp/x-load/x-load_git.bb:FILESPATH = "${FILE_DIRNAME}/x-load-git/${MACHINE}:${FILE_DIRNAME}/x-load-git/"
  meta/recipes-bsp/u-boot/u-boot.inc:FILESPATH =. "${FILE_DIRNAME}/u-boot-git/${MACHINE}:"
  meta/recipes-support/libpcre/libpcre_8.32.bb:FILESPATH .= ":${@base_set_filespath([bb.which(BBPATH, 'recipes-support/libpcre/files', direction=True)], d)}"
  meta/recipes-core/dbus/dbus-ptest_1.6.8.bb:FILESPATH = "${FILE_DIRNAME}/dbus-${PV}"
  meta/recipes-core/eglibc/ldconfig-native_2.12.1.bb:FILESPATH = "${FILE_DIRNAME}/${PN}-${PV}/"
  meta/recipes-core/eglibc/eglibc_2.17.bb:FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/eglibc-${PV}', '${FILE_DIRNAME}/eglibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' 
], d)}"
  meta/recipes-core/eglibc/cross-localedef-native_2.17.bb:FILESPATH = "${FILE_DIRNAME}/eglibc-${PV}"
  meta/recipes-core/uclibc/uclibc-git.inc:FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/uclibc-git' ], d)}"
  meta/recipes-kernel/systemtap/systemtap_git.inc:FILESPATH = "${FILE_DIRNAME}/systemtap"
  meta/recipes-kernel/trace-cmd/kernelshark_1.2.bb:FILESPATH = "${FILE_DIRNAME}/trace-cmd"
  meta/recipes-multimedia/gstreamer/gst-plugins.inc:FILESPATH =. "${FILE_DIRNAME}/gst-plugins:"

In my case, I wanted to write recipes-devtools/python/python-pygobject_2.27.91.bbappend to add a patch I'm working on here. The only way I could get my .bbappend file to function was to remove the FILESPATH assignment from the main recipe.

I believe that most of these assignments are incorrect and should be removed. I can send a patch for the one that I've built & tested, but I'm not sure I should be mucking about with all the others...

Signature · 4 lines
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------
#1 lore raw
Quoted 6 lines · Gary Thomas

I have run across a problem where a main recipe is written in such a way that makes using .bbappend impossible. This happens if the main recipe has an explicit assignment for FILESPATH. In this case, the .bbappend is unable to add to that path, e.g. to add a machine specific patch, etc.

If the explicit definition calls base_set_filespath, then FILESEXTRAPATHS can still be used.

Signature · 1 line
Christopher Larson
#2 lore raw
Quoted 9 lines · On Saturday 06 April 2013 15:14:20 Chris Larson wrote:
Quoted 5 lines · Gary Thomas

I have run across a problem where a main recipe is written in such a way that makes using .bbappend impossible. This happens if the main recipe has an explicit assignment for FILESPATH. In this case, the .bbappend is unable to add to that path, e.g. to add a machine specific patch, etc.

If the explicit definition calls base_set_filespath, then FILESEXTRAPATHS can still be used.

Also a number of the examples given are using .= which should also be acceptable and won't interfere with FILESEXTRAPATHS usage in bbappends. However the ones that just assign it to a value without base_set_filespath - especially when they're covering directories that are already handled by the default value of FILESPATH - should be removed.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre