pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Tatsuo Ishii <ishii@postgresql.org>
Cc: nagata@sraoss.co.jp
Cc: daniel@yesql.se
Cc: pgsql-hackers@postgresql.org
Subject: Re: Doc: typo in config.sgml
Date: Tue, 3 Dec 2024 18:27:00 -0500
Message-ID: <Z0-TxKWAgXvrKpSw@momjian.us> (raw)
In-Reply-To: <Z09w7Cyg4aRCcEo8@momjian.us>
References: <ZzwA_DayripquW7e@momjian.us>
	<20241119193121.7ba727c489b5f0b6d20f9c25@sraoss.co.jp>
	<20241126.182513.1752581942460106099.ishii@postgresql.org>
	<Z0X5xYJ_dvkREogb@momjian.us>
	<1682864.1732639382@sss.pgh.pa.us>
	<Z0YApkVlEfHYOaC4@momjian.us>
	<1689262.1732642897@sss.pgh.pa.us>
	<Z0Ybr9iRBkOUYOGZ@momjian.us>
	<88cb6ecf-22bb-431e-974b-1cd236a80364@eisentraut.org>
	<Z09w7Cyg4aRCcEo8@momjian.us>

On Tue, Dec  3, 2024 at 03:58:20PM -0500, Bruce Momjian wrote:
> On Tue, Dec  3, 2024 at 09:05:45PM +0100, Peter Eisentraut wrote:
> > On 26.11.24 20:04, Bruce Momjian wrote:
> > >   %.pdf: %.fo $(ALL_IMAGES)
> > > -	$(FOP) -fo $< -pdf $@
> > > +	LANG=C $(FOP) -fo $< -pdf $@ 2>&1 | \
> > > +	awk 'BEGIN { warn = 0 }  { print }/not available in font/ { warn = 1 }  \
> > > +	END { if (warn != 0) print("\nFound characters that cannot be displayed in the PDF document") }' 1>&2
> > 
> > Wouldn't that lose the exit code from the fop execution?
> 
> Yikes, I think it would.  Let me work on a fix now.

Fixed in the attached applied patch.  Glad you saw this mistake.

-- 
  Bruce Momjian  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Do not let urgent matters crowd out time for investment in the future.

Attachments:

master.diff (text/x-diff, 1.0K) download diff --git a/doc/src/sgml/Makefile b/doc/src/sgml/Makefile index 4a08b6f433e..9d52715ff4b 100644 --- a/doc/src/sgml/Makefile +++ b/doc/src/sgml/Makefile @@ -156,9 +156,11 @@ XSLTPROC_FO_FLAGS += --stringparam img.src.path '$(srcdir)/' $(XSLTPROC) $(XMLINCLUDE) $(XSLTPROCFLAGS) $(XSLTPROC_FO_FLAGS) --stringparam paper.type USletter -o $@ $^ %.pdf: %.fo $(ALL_IMAGES) - LANG=C $(FOP) -fo $< -pdf $@ 2>&1 | \ - awk 'BEGIN { warn = 0 } { print } /not available in font/ { warn = 1 } \ - END { if (warn != 0) print("\nFound characters that cannot be output in the PDF document; see README.non-ASCII") }' 1>&2 + @# There is no easy way to pipe output and capture its return code, so output a special string on failure. + { LANG=C $(FOP) -fo $< -pdf $@ 2>&1; [ "$$?" -ne 0 ] && echo "FOP_ERROR"; } | \ + awk 'BEGIN { warn = 0 } ! /^FOP_ERROR$$/ { print } /not available in font/ { warn = 1 } \ + END { if (warn != 0) print("\nFound characters that cannot be output in the PDF document; see README.non-ASCII"); \ + if ($$0 ~ /^FOP_ERROR$$/) { exit 1} }' 1>&2 ##

view thread (70+ messages)

Message-ID: <Z0-TxKWAgXvrKpSw@momjian.us>
Permalink:  ../Z0-TxKWAgXvrKpSw@momjian.us/
Also on:    postgresql.org/message-id/Z0-TxKWAgXvrKpSw@momjian.us

 ·  · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: bruce@momjian.us, peter@eisentraut.org, tgl@sss.pgh.pa.us, ishii@postgresql.org, nagata@sraoss.co.jp, daniel@yesql.se
  Subject: Re: Doc: typo in config.sgml
  In-Reply-To: <Z0-TxKWAgXvrKpSw@momjian.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox