Le 11/3/20 à 11:05 AM, Jan Beulich a écrit :
On 03.11.2020 11:00, Julien Grall wrote:
Hi Frédéric,

Hi Julien,

On 31/10/2020 15:14, Frédéric Pierret (fepitre) wrote:
---
   xen/Makefile | 2 ++
   1 file changed, 2 insertions(+)

diff --git a/xen/Makefile b/xen/Makefile
index 30b1847515..4cc35556ef 100644
--- a/xen/Makefile
+++ b/xen/Makefile
@@ -6,6 +6,8 @@ export XEN_EXTRAVERSION ?= -unstable$(XEN_VENDORVERSION)
   export XEN_FULLVERSION   = 
$(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION)
   -include xen-version
+export SOURCE_DATE_EPOCH ?= $(shell git log -1 --format=%ct 2>/dev/null)

It is possible to download a tarball for Xen release (see [1]). They
don't contain the .git directory and therefore this command would fail.

Should we fallback to "date" in this case?

Isn't this what already happens? The variable would be assigned
an empty value in this case, wouldn't it?

Julien, Jan, yes it already fallback to "date" if the variable is empty (it's the reason of 
"2>/dev/null") in the other test of check if SOURCE_DATE_EPOCH is defined. Maybe there is 
more elegant way for this. Depending on the wanted here for providing or not a default value in case 
of git sources, this could be documented instead as suggested previously.

Jan


Regards,
Frédéric

Attachment: OpenPGP_0x484010B5CDC576E2.asc
Description: application/pgp-keys

Attachment: OpenPGP_signature
Description: OpenPGP digital signature

Reply via email to