Index | Thread | Search

From:
Klemens Nanni <kn@openbsd.org>
Subject:
Re: bsd.port.mk: CHECKSUM_QUIET
To:
ports <ports@openbsd.org>
Date:
Tue, 15 Oct 2024 16:46:06 +0000

Download raw body.

Thread
15.10.2024 16:27, Marc Espie пишет:
> I'm not even sure there is a need for a knob.

I'm more than happy to shut things up by default.

Index: bsd.port.mk
===================================================================
RCS file: /cvs/ports/infrastructure/mk/bsd.port.mk,v
diff -u -p -r1.1639 bsd.port.mk
--- bsd.port.mk	6 Oct 2024 10:24:24 -0000	1.1639
+++ bsd.port.mk	15 Oct 2024 13:36:55 -0000
@@ -2614,11 +2614,11 @@ _internal-checksum: _internal-fetch
 	  exit 1; \
 	fi
 	@cd ${DISTDIR}; OK=true; list=''; files=''; \
+	  set -o pipefail; \
 	  for file in ${CHECKSUMFILES}; do \
 		if set -- $$(grep "^${_CIPHER:U} ($$file)" ${CHECKSUM_FILE}); \
 		then \
-			echo -n '>> '; \
-			if ! echo "$$@" | cksum -c; then \
+			if ! echo "$$@" | cksum -cq | sed 's/^/>> /'; then \
 				list="$$list $$file ${_CIPHER} $$4"; \
 				files="$$files ${DISTDIR}/$$file"; \
 				OK=false; \
@@ -2642,6 +2642,8 @@ _internal-checksum: _internal-fetch
 		  echo "\tmake REFETCH=true [other args]"; \
 		  exit 1; \
 		fi; \
+	  else \
+		  ${ECHO_MSG} ">> (${_CIPHER:U}) all files: OK"; \
 	  fi
 .    endif
 .  endif