From 35736fe8f768411fe1b933703ccfe498d49b9aba Mon Sep 17 00:00:00 2001 From: jca Date: Wed, 30 Jul 2025 12:06:30 +0000 Subject: [PATCH] In do-extract fail early if the decompressor errors out Using set -o pipefail we can detect when gzip -d and friends fail when decompressing archives. This is better than a partially extracted archive leading to failures to patch or build later. ok phessler@ landry@ --- infrastructure/mk/bsd.port.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/infrastructure/mk/bsd.port.mk b/infrastructure/mk/bsd.port.mk index 2f0f9ca05d4..546cdf49fba 100644 --- a/infrastructure/mk/bsd.port.mk +++ b/infrastructure/mk/bsd.port.mk @@ -1,6 +1,6 @@ #-*- mode: Makefile; tab-width: 4; -*- # ex:ts=4 sw=4 filetype=make: -# $OpenBSD: bsd.port.mk,v 1.1644 2025/03/02 13:16:48 landry Exp $ +# $OpenBSD: bsd.port.mk,v 1.1645 2025/07/30 12:06:30 jca Exp $ # # bsd.port.mk - 940820 Jordan K. Hubbard. # This file is in the public domain. @@ -2828,7 +2828,7 @@ _post-extract-finalize: .if !target(do-extract) do-extract: # What EXTRACT normally does: - @PATH=${PORTPATH}; set -e; cd ${WRKDIR}; \ + @PATH=${PORTPATH}; set -e; set -o pipefail; cd ${WRKDIR}; \ for archive in ${EXTRACT_ONLY}; do \ case $$archive in \ ${EXTRACT_CASES} \