public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ulf Magnusson <ulfalizer.lkml@gmail.com>
To: Jim Davis <jim.epost@gmail.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	linux-doc <linux-doc@vger.kernel.org>,
	Michal Marek <mmarek@suse.cz>, Jonathan Corbet <corbet@lwn.net>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	smueller@chronox.de, Ulf Magnusson <ulfalizer@gmail.com>
Subject: Re: [PATCH] DocBook: Avoid stdout junk with no man pages to compress
Date: Mon, 13 Jul 2015 02:46:48 +0200	[thread overview]
Message-ID: <20150713004647.GA20148@huvuddator> (raw)
In-Reply-To: <CA+r1ZhiqQh2SYjnhcp3yx6byb8UtNindWXP5JCChNZvyormVdQ@mail.gmail.com>

On Sun, Jul 12, 2015 at 04:36:53PM -0700, Jim Davis wrote:
> On Sun, Jul 12, 2015 at 2:59 PM, Ulf Magnusson <ulfalizer.lkml@gmail.com> wrote:
> > gzip would run as 'gzip -f' when no uncompressed man pages were found,
> > making it compress the (empty) stdin to stdout.
> 
> > --- a/Documentation/DocBook/Makefile
> > +++ b/Documentation/DocBook/Makefile
> > @@ -56,7 +56,7 @@ htmldocs: $(HTML)
> >
> >  MAN := $(patsubst %.xml, %.9, $(BOOKS))
> >  mandocs: $(MAN)
> > -       find $(obj)/man -name '*.9' | xargs gzip -f
> > +       find $(obj)/man -name '*.9' -exec gzip -f {} \;
> >
> >  installmandocs: mandocs
> >         mkdir -p /usr/local/man/man9/
> 
> That does get rid of the binary burp, but 'xargs gzip -f'  has been in
> the Makefile since January, and gzipping '\n' just started recently.
> So what's changed?
> 

No idea. I just assumed it had been broken since then, since the version
before d56fcf299fb4 (DocBook: Do not exceed argument list limit) looked
for *.9 files before running gzip:

mandocs: $(MAN)
	$(if $(wildcard $(obj)/man/*.9),gzip -f $(obj)/man/*.9)

> It looks like, for whatever reason, make installmandocs always ends up
> rerunning mandocs -- there's now a 'GEN  Documentation
> Docbook//v4l2.xml' printed, and that extra mandocs invocation is where
> the problematic second invocation of find is coming from.  I won't
> pretend to understand the Makefile flow to guess at why that's
> happening, but obviously 'make mandocs; make installmandocs' shouldn't
> need to regenerate things already generated.

I won't pretend to understand the Makefile flow either. Guess it might
be worth looking into v4l2.xml as well then. Could be some directory
shenanigans going on judging from the '//'.

> 
> In any event,
> 
> Tested-by: Jim Davis <jim.epost@gmail.com>
> 
> Jim

I just noticed the commit message only mentions the alternative
solutions and not the implemented solution. Could send a v2 that fixes
that, but I'll wait for more comments first.

Cheers,
Ulf

  reply	other threads:[~2015-07-13  0:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-12 21:59 [PATCH] DocBook: Avoid stdout junk with no man pages to compress Ulf Magnusson
2015-07-12 23:36 ` Jim Davis
2015-07-13  0:46   ` Ulf Magnusson [this message]
2015-07-14  4:27     ` Ulf Magnusson
2015-07-14  4:35       ` Ulf Magnusson

Reply instructions:

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

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

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150713004647.GA20148@huvuddator \
    --to=ulfalizer.lkml@gmail.com \
    --cc=corbet@lwn.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=jim.epost@gmail.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=smueller@chronox.de \
    --cc=ulfalizer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox