Search code examples
openembeddedbitbake

BitBake SRC_URI with + in the filename


I have a recipe that requires downloading a file with a + in the file name. It fetches and unpacks the file to a path matching the file name, as one would expect, but then attempts to work out of a directory without the +... extension. For example:

# in the xsd recipe
SRC_URI="http://www.codesynthesis.com/download/xsd/3.3/xsd-3.3.0-2+dep.tar.bz2"

Then bitbake xsd results in the following two directories:

xsd-3.3.0-2       (aka, ${S} according to bitbake)
xsd-3.3.0-2+dep   (where the files actually are)

So far I've attempted to change the S variable after the unpack task occurs:

do_unpack_append () {
    S=${S}+dep
}

This results in an error that the line in the function cannot be parsed.

Does anyone know of a way around this problem?


Solution

  • After a great deal of searching, the trick was to update the S variable from within the recipe (i.e., not a task function):

    S .= "+dep"
    

    After a -c cleanall, BitBake fetched, decompressed, and then began working out of the corrected source path.