diff options
author | orbea <orbea@riseup.net> | 2024-02-23 08:59:20 -0800 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2024-03-21 02:50:00 +0000 |
commit | be1ece7a925bfb986e2dcaf7a341d8d01864018b (patch) | |
tree | d1893eb2f4515c97d2652948dda8f3ff7d1d8989 /dev-build | |
parent | dev-build/samurai: update maintainers (diff) | |
download | gentoo-be1ece7a925bfb986e2dcaf7a341d8d01864018b.tar.gz gentoo-be1ece7a925bfb986e2dcaf7a341d8d01864018b.tar.bz2 gentoo-be1ece7a925bfb986e2dcaf7a341d8d01864018b.zip |
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@riseup.net>
Closes: https://github.com/gentoo/gentoo/pull/35508
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-build')
-rw-r--r-- | dev-build/samurai/files/samurai-1.2-phony_targets_fix.patch | 30 | ||||
-rw-r--r-- | dev-build/samurai/samurai-1.2-r3.ebuild (renamed from dev-build/samurai/samurai-1.2-r2.ebuild) | 1 |
2 files changed, 31 insertions, 0 deletions
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 <mforney@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 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() { |