git: 9ca20e5ec9e2 - stable/14 - Makefile.inc1: Conditionalize some package related variables
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 13 Mar 2025 18:10:07 UTC
The branch stable/14 has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=9ca20e5ec9e2a4779ede9ba8f00e00ef1db92681
commit 9ca20e5ec9e2a4779ede9ba8f00e00ef1db92681
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2025-03-10 17:30:26 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2025-03-13 18:09:09 +0000
Makefile.inc1: Conditionalize some package related variables
In particular, don't invoke git to compute SOURCE_DATE_EPOCH for
unrelated targets like check-old or delete-old. If the git invocation
fails (e.g. when using a git worktree mounted over NFS) it can
generate a lot of irrelevant warning spam.
Reviewed by: emaste
Fixes: 8a3537aaf7c1 ("Makefile.inc1: Make package timestamps reproducible by default")
Differential Revision: https://reviews.freebsd.org/D49278
(cherry picked from commit db6f2bb93a9706963f66d270edb5ee62c37a9296)
---
Makefile.inc1 | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile.inc1 b/Makefile.inc1
index e43b2ff2e527..34b2cd658172 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -572,6 +572,7 @@ PKG_VERSION:= ${_PKG_REVISION}${EXTRA_REVISION:C/[[:space:]]//g}
.endif
.endif # !defined(PKG_VERSION)
+.if make(*package*)
.if !defined(PKG_TIMESTAMP)
.if !empty(GIT_CMD) && exists(${GIT_CMD}) && exists(${SRCDIR}/.git)
SOURCE_DATE_EPOCH!= ${GIT_CMD} -C ${SRCDIR} show -s --format=%ct HEAD
@@ -589,6 +590,7 @@ PKG_WWW?= https://www.FreeBSD.org
.export PKG_NAME_PREFIX
.export PKG_MAINTAINER
.export PKG_WWW
+.endif
.if !defined(_MKSHOWCONFIG)
_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} -f /dev/null \