[libvirt] [PATCH 1/2] docs: news: remove sed sorcery

Peter Krempa pkrempa at redhat.com
Wed Jul 17 15:20:25 UTC 2019


On Wed, Jul 17, 2019 at 17:06:22 +0200, Ján Tomko wrote:
> On Wed, Jul 17, 2019 at 05:02:02PM +0200, Peter Krempa wrote:
> > On Wed, Jul 17, 2019 at 16:37:06 +0200, Ján Tomko wrote:
> > > Set a default namespace in the stylesheet instead.
> > > 
> > > Signed-off-by: Ján Tomko <jtomko at redhat.com>
> > > ---
> > >  docs/Makefile.am   | 8 +-------
> > >  docs/news-html.xsl | 4 +++-
> > >  2 files changed, 4 insertions(+), 8 deletions(-)
> > 
> > Fails in vpath build:
> > 
> > /usr/bin/xsltproc --nonet \
> >    /home/pipo/libvirt/docs/news-html.xsl \
> >    /home/pipo/libvirt/docs/news.xml \
> >  >news.html.in-tmp \
> >    || { rm -f news.html.in-tmp; exit 1; };
> > name=`echo news.html.tmp | sed -e 's/.tmp//'`; \
> >  dir=`dirname news.html.tmp` ; \
> >  if test "$dir" = "."; \
> >  then \
> >    style=site.xsl; \
> >  else \
> >    /usr/bin/mkdir -p $dir; \
> >    style=subsite.xsl; \
> >  fi; \
> >  /usr/bin/xsltproc --stringparam pagename $name \
> >    --stringparam timestamp "Wed Jul 17 15:00:08 UTC 2019" --nonet \
> >    /home/pipo/libvirt/docs/$style news.html.in > news.html.tmp \
> >    || { rm news.html.tmp && exit 1; }
> > warning: failed to load external entity "news.html.in"
> > 
> 
> In non-vpath as well. I had a leftover file which is why it worked for
> me:
> 
> diff --git a/docs/Makefile.am b/docs/Makefile.am
> index bc2fd6ea42..ae2673ca9b 100644
> --- a/docs/Makefile.am
> +++ b/docs/Makefile.am
> @@ -242,8 +242,8 @@ news.html.in: \
>        $(AM_V_GEN)$(XSLTPROC) --nonet \
>            $(srcdir)/news-html.xsl \
>            $(srcdir)/news.xml \
> -         >$@-tmp \
> -           || { rm -f $@-tmp; exit 1; };
> +         >$@ \
> +           || { rm -f $@; exit 1; };
> EXTRA_DIST += \
>        $(srcdir)/news.xml \
>        $(srcdir)/news.rng \
> 

ACK


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20190717/27ad81b0/attachment-0001.sig>


More information about the libvir-list mailing list