On Fri, 2021-10-15 at 03:03 -0700, Chuck Wolber wrote: > Is there a recommended strategy to get do_fetch to invalidate on directory > path changes in paths pointed to by file:// URLs in SRC_URI? > > Example: > > SRC_URI += "file://src;subdir=${S}" > > A file at src/foo/bar/baz is recognized just fine. But then a directory change > to something like src/foo/bar2/baz is not recognized and does not invalidate > any tasks in subsequent builds. > > Use case is a recipe that has a fair bit of metadata that is not even remotely > amenable to the typical flat layout expected of a set of patches. > > ..Ch:W.. > > P.S. I attempted to do this with an event handler that was run when > bb.event.RecipePreFinalise is is fired. It would compare directory trees and > set do_fetch[nostamp] = "1" to invalidate the fetcher task. But I got really > spotty behavior. It seems like event handlers are cached like tasks.
I can see why this breaks and it isn't entirely straightforward to fix since we'd have to add data to the file-checksums entries which are generated by both OE and Bitbake. I have a bit of a horrible idea to do this in master-next which does solve the problem. We probably need a new bitbake selftest testcase before I could think about merging it though. Cheers, Richard
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#55085): https://lists.yoctoproject.org/g/yocto/message/55085 Mute This Topic: https://lists.yoctoproject.org/mt/86335443/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-