Created attachment 894631 [details] build.log and emerge --info This actually is a regression from 4.9.2 Test phase: sci-libs/netcdf-4.9.2-r1 * ERROR: sci-libs/netcdf-4.9.2-r1::gentoo failed (test phase): * (no error message) * * Call stack: * ebuild.sh, line 136: Called src_test * environment, line 2252: Called die * The specific snippet of code: * [[ -f "${BUILD_DIR}/nc_test4/run_par_test.sh" ]] && sed -e 's/mpiexec/mpiexec --use-hwthread-cpus/g' -i "${BUILD_DIR}/nc_test4/run_par_test.sh" || die;
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7aa3a581c47230c4df31588134acd090b67cc984 commit 7aa3a581c47230c4df31588134acd090b67cc984 Author: Eli Schwartz <eschwartz93@gmail.com> AuthorDate: 2024-05-29 23:34:59 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-05-29 23:46:07 +0000 sci-libs/netcdf: fix bad bash scripting leading to failed tests If USE=-mpi, a file in src_test is NOT sedded to fix a bug in the file, because the file does not exist. But this condition was incorrectly coded. In bash: ``` cmd1 && cmd2 || cmd3 ``` is a code smell. If either of the first two commands fails, the third command is run -- in this case, die. In other words, the first two commands were *supposed* to be "only run cmd2 if it makes sense to". Instead, if it "doesn't make sense to" run cmd2, the die was triggered. A more general solution is to spec the build format to require all commands to pass without manually `die`ing (leading to the use of && ceasing in general), but that is not how portage works. Either way, the solution is using `if` as intended. ref. https://mywiki.wooledge.org/BashGuide/TestsAndConditionals Closes: https://bugs.gentoo.org/933136 Signed-off-by: Eli Schwartz <eschwartz93@gmail.com> Signed-off-by: Sam James <sam@gentoo.org> sci-libs/netcdf/netcdf-4.9.2-r1.ebuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)