From d59326817be4799a01bcc3885bf61c6dafcfeb71 Mon Sep 17 00:00:00 2001 From: Bruce Ashfield Date: Sat, 6 Dec 2025 15:36:46 +0000 Subject: go-mod-discovery: move patching after discovery build When updating a SRCREV and then running discovery, we expect that some patches will fail. We don't want that to block discovery as these patches are not normally ADDING dependencies that would be found. So we move discovery before patch and patch failures can be dealt with on a full build. Signed-off-by: Bruce Ashfield --- classes/go-mod-discovery.bbclass | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/classes/go-mod-discovery.bbclass b/classes/go-mod-discovery.bbclass index d57a7d38..87cd9def 100644 --- a/classes/go-mod-discovery.bbclass +++ b/classes/go-mod-discovery.bbclass @@ -263,7 +263,9 @@ Hint: Set GO_MOD_DISCOVERY_SRCDIR to the directory containing go.mod" echo "" } -addtask discover_modules after do_patch +# Run after do_unpack but NOT after do_patch - patches often fail during uprevs +# and are rarely needed for discovery (they typically fix runtime behavior, not dependencies) +addtask discover_modules after do_unpack do_discover_modules[depends] = "${PN}:do_prepare_recipe_sysroot" do_discover_modules[network] = "1" do_discover_modules[nostamp] = "1" @@ -432,7 +434,8 @@ python do_discover_and_generate_setdeps() { pass } -addtask discover_and_generate after do_patch +# Run after do_unpack but NOT after do_patch - patches often fail during uprevs +addtask discover_and_generate after do_unpack do_discover_and_generate[depends] = "${PN}:do_prepare_recipe_sysroot" do_discover_and_generate[network] = "1" do_discover_and_generate[nostamp] = "1" -- cgit v1.2.3-54-g00ecf