1574b7d34d
resolves: RHEL-33851
41 lines
1.4 KiB
Diff
41 lines
1.4 KiB
Diff
From e1ee1fb65798777287ae7722b9391969623da97f Mon Sep 17 00:00:00 2001
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
Date: Thu, 4 Apr 2024 09:38:28 +0100
|
|
Subject: [PATCH] po-docs: Run po4a-translate and sed commands separately
|
|
|
|
I noticed that 1-byte translated POD files were being generated in the
|
|
output directory (po-docs/ja/). This seems to have happened because
|
|
po4a-translate was generating an error, but because we were
|
|
immediately pipeing the output into sed the error was suppressed.
|
|
|
|
By running them as two separate commands this cannot happen.
|
|
|
|
Fixes: commit bd896d68c06d7f66303bd77daa666367b0de5f3a
|
|
(cherry picked from commit d755070346c0498672517c844d7ced52e9263197)
|
|
---
|
|
po-docs/language.mk | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/po-docs/language.mk b/po-docs/language.mk
|
|
index 4c2a5595..9fdb4c2f 100644
|
|
--- a/po-docs/language.mk
|
|
+++ b/po-docs/language.mk
|
|
@@ -179,13 +179,16 @@ virt-p2v.1: virt-p2v.pod virt-p2v-kernel-config.pod
|
|
# Remove both.
|
|
# XXX Fix po4a so it doesn't do this.
|
|
%.pod: $(srcdir)/../$(LINGUA).po
|
|
+ rm -f $@ $@-t
|
|
$(guestfs_am_v_po4a_translate)$(PO4A_TRANSLATE) \
|
|
-f pod \
|
|
-M utf-8 -L utf-8 \
|
|
-k 0 \
|
|
-m $(top_srcdir)/$(shell grep '/$(notdir $@)$$' $(top_srcdir)/po-docs/podfiles) \
|
|
-p $< \
|
|
- | $(SED) '0,/^=encoding/d' > $@
|
|
+ -l $@-t
|
|
+ $(SED) '0,/^=encoding/d' < $@-t > $@
|
|
+ rm $@-t
|
|
|
|
# XXX Can automake do this properly?
|
|
install-data-hook:
|