commit: be1ece7a925bfb986e2dcaf7a341d8d01864018b Author: orbea <orbea <AT> riseup <DOT> net> AuthorDate: Fri Feb 23 16:59:20 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Thu Mar 21 02:50:00 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=be1ece7a
dev-build/samurai: fix segfault for phony targets Upstream-Issue: https://github.com/michaelforney/samurai/issues/66 Upstream-Issue: https://github.com/michaelforney/samurai/issues/81 Upstream-Commit: https://github.com/michaelforney/samurai/commit/fb61f22c7e690715d309c41812412c4f432ef53a Signed-off-by: orbea <orbea <AT> riseup.net> Closes: https://github.com/gentoo/gentoo/pull/35508 Signed-off-by: Sam James <sam <AT> gentoo.org> .../files/samurai-1.2-phony_targets_fix.patch | 30 ++++++++++++++++++++++ ...samurai-1.2-r2.ebuild => samurai-1.2-r3.ebuild} | 1 + 2 files changed, 31 insertions(+) diff --git a/dev-build/samurai/files/samurai-1.2-phony_targets_fix.patch b/dev-build/samurai/files/samurai-1.2-phony_targets_fix.patch new file mode 100644 index 000000000000..8794850a7285 --- /dev/null +++ b/dev-build/samurai/files/samurai-1.2-phony_targets_fix.patch @@ -0,0 +1,30 @@ +https://github.com/michaelforney/samurai/issues/66 +https://github.com/michaelforney/samurai/issues/81 +https://github.com/michaelforney/samurai/commit/fb61f22c7e690715d309c41812412c4f432ef53a + +From fb61f22c7e690715d309c41812412c4f432ef53a Mon Sep 17 00:00:00 2001 +From: Michael Forney <mfor...@mforney.org> +Date: Wed, 31 Mar 2021 14:04:29 -0700 +Subject: [PATCH] build: Don't try to print phony edges during dry-run + +This causes a segfault since phony edges have no command. It also +messes up the nstarted/nfinished counts. + +Fixes #66. +--- + build.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/build.c b/build.c +index 368e5f9..1cb736f 100644 +--- a/build.c ++++ b/build.c +@@ -540,7 +540,7 @@ build(void) + while (work && numjobs < buildopts.maxjobs && numfail < buildopts.maxfail) { + e = work; + work = work->worknext; +- if (buildopts.dryrun) { ++ if (e->rule != &phonyrule && buildopts.dryrun) { + ++nstarted; + printstatus(e, edgevar(e, "command", true)); + ++nfinished; diff --git a/dev-build/samurai/samurai-1.2-r2.ebuild b/dev-build/samurai/samurai-1.2-r3.ebuild similarity index 94% rename from dev-build/samurai/samurai-1.2-r2.ebuild rename to dev-build/samurai/samurai-1.2-r3.ebuild index d6584ed27041..4015659f2356 100644 --- a/dev-build/samurai/samurai-1.2-r2.ebuild +++ b/dev-build/samurai/samurai-1.2-r3.ebuild @@ -20,6 +20,7 @@ SLOT="0" PATCHES=( "${FILESDIR}/${P}-null_pointer_fix.patch" # 786951 + "${FILESDIR}/${P}-phony_targets_fix.patch" ) src_compile() {