Re: [libvirt PATCH 2/2] meson: Detect and reject invalid rst2html5 command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 09, 2021 at 05:13:29PM +0200, Andrea Bolognani wrote:
> The version coming from the rst2html5 package instead of the
> docutils package is unable to successfully generate the libvirt
> documentation.
> 
> Examples of users encountering build issues because of the wrong
> version of rst2html5 being installed on their systems:
> 
>   https://gitlab.com/libvirt/libvirt/-/issues/40
>   https://gitlab.com/libvirt/libvirt/-/issues/139
>   https://gitlab.com/libvirt/libvirt/-/issues/169
>   https://gitlab.com/libvirt/libvirt/-/issues/195
> 
> Signed-off-by: Andrea Bolognani <abologna@xxxxxxxxxx>
> ---
>  meson.build | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 
> diff --git a/meson.build b/meson.build
> index 32ad688c9c..02357a2678 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -813,6 +813,34 @@ foreach item : required_programs_groups
>    set_variable('@0@_prog'.format(varname), prog)
>  endforeach
>  
> +# There are two versions of rst2html5 in the wild: one is the version
> +# coming from the docutils package, and the other is the one coming
> +# from the rst2html5 package. These versions are subtly different,
> +# and the libvirt documentation can only be successfully generated
> +# using the docutils version. Every now and then, users will report
> +# build failures that can be traced back to having the wrong version
> +# installed.
> +#
> +# The only reliable way to tell the two binaris apart seems to be
> +# looking look at their version information: the docutils version
> +# will report
> +#
> +#   rst2html5 (Docutils ..., Python ..., on ...)
> +#
> +# whereas the rst2html5 version will report
> +#
> +#   rst2html5 ... (Docutils ..., Python ..., on ...)
> +#
> +# with the additional bit of information being the version number for
> +# the rst2html5 package itself.

This feels way too fragile to me.

Can't we just write out a 5 line rst doc showing the problem and
try to run the command  to detect brokeness ?


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux