From 207d38f7a24250f75cf88f3cb07985d92692ece5 Mon Sep 17 00:00:00 2001 From: Pavel Hrdina Date: Mon, 6 Jan 2020 15:23:06 +0100 Subject: [PATCH] po/Makefile.am: use SOURCE_DATE_EPOCH to set POT creation date MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When building RPMs for libvirt the PO files are part of libvirt-libs package. Now that we generate libvirt.pot during build time the POT creation date is also generated at that time. The issue here is that when building libvirt-libs for x86_64 and i686 the generated libvirt.pot file will have different POT creation date which affects installed PO files as well which leads to conflict when installing both x86_64 and i686 packages. Signed-off-by: Pavel Hrdina Reviewed-by: Daniel P. Berrangé --- po/Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/po/Makefile.am b/po/Makefile.am index 443d8a4dc1..277dd89d7d 100644 --- a/po/Makefile.am +++ b/po/Makefile.am @@ -45,10 +45,19 @@ XGETTEXT_ARGS = \ --msgid-bugs-address="$(MSGID_BUGS_ADDRESS)" \ $(NULL) +POT_CREATION_DATE = $(shell \ + if test -n "$$SOURCE_DATE_EPOCH"; \ + then \ + date --date="@$$SOURCE_DATE_EPOCH" +"%F %R%z"; \ + else \ + date +'%F %R%z'; \ + fi) + SED_PO_FIXUP_ARGS = \ -e "s|text/plain; charset=CHARSET|text/plain; charset=UTF-8|g" \ -e "s|SOME DESCRIPTIVE TITLE|Libvirt package strings|g" \ -e "s|Copyright (C) YEAR|Copyright (C) $$(date +'%Y')|" \ + -e "s|POT-Creation-Date:[^\]*|POT-Creation-Date: $(POT_CREATION_DATE)|" \ $(NULL) update-po: $(POFILES)