I have a do_configure() python function which is essentially

python do_configure() {
    import fileinput
    with open("foo.txt", "w") as out:
        for line in fileinput.input(files=d.getVar("FOO_INPUT").split()):
            line = d.expand(line)
            out.write(line)
}

So some of those input files can contain ${VARIABLE} and it gets
replaced appropriately. But to my surprise, when I then change VARIABLE,
the recipe doesn't get rebuilt, so it seems that bitbake doesn't
automatically realize that the recipe (or task) depends on VARIABLE.

So digging a bit into the code, it seems that d.expand() calls
expandWithRefs(), which returns a VariableParse object, but then only
uses the .value property, throwing away .references. So I assume that
what I really should be doing is call expandWithRefs and then somehow
manually pass .references to... something? Or, there must be some other
bitbake interface for doing this properly?

Rasmus
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#48082): https://lists.yoctoproject.org/g/yocto/message/48082
Mute This Topic: https://lists.yoctoproject.org/mt/69979676/21656
Group Owner: [email protected]
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub  
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to