public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@kernel.org>
To: Danish Prakash <contact@danishpraka.sh>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	Jonathan Corbet <corbet@lwn.net>,
	linux-doc@vger.kernel.org (open list:DOCUMENTATION),
	linux-kernel@vger.kernel.org (open list)
Subject: Re: [PATCH] scripts/sphinx-pre-install: fix incorrect package names for openSUSE
Date: Fri, 31 May 2024 10:49:19 +0200	[thread overview]
Message-ID: <20240531104919.18504578@coco.lan> (raw)
In-Reply-To: <20240531061941.9607-1-contact@danishpraka.sh>

Hi Danish,

Em Fri, 31 May 2024 11:49:15 +0530
Danish Prakash <contact@danishpraka.sh> escreveu:

> openSUSE made some changes to python package names in the recent
> past and hence the current information on installing the relevant
> doc-related packages yields no output when run on openSUSE distros.
> Update the package names to the correct ones.
> 
> Signed-off-by: Danish Prakash <contact@danishpraka.sh>
> ---
>  scripts/sphinx-pre-install | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/sphinx-pre-install b/scripts/sphinx-pre-install
> index c1121f098542..56bda8b43a44 100755
> --- a/scripts/sphinx-pre-install
> +++ b/scripts/sphinx-pre-install
> @@ -465,8 +465,8 @@ sub give_redhat_hints()
>  sub give_opensuse_hints()
>  {
>  	my %map = (
> -		"python-sphinx"		=> "python3-sphinx",
> -		"yaml"			=> "python3-pyyaml",
> +		"python-sphinx"		=> "python3-Sphinx",
> +		"yaml"			=> "python3-pyaml",
>  		"virtualenv"		=> "python3-virtualenv",
>  		"dot"			=> "graphviz",
>  		"convert"		=> "ImageMagick",

The best would be to check for the openSUSE version, as otherwise
such change will break for others using older versions.

There are some such checks already for other distros. See, for instance

	sub give_redhat_hints()
	{
	...
	$rel = $1 if ($system_release =~ /release\s+(\d+)/);

        if (!($system_release =~ /Fedora/)) {
		...
	} else {
                if ($rel && $rel < 26) {
                        $old = 1;
                }
                if ($rel && $rel >= 38) {
                        $noto_sans_redhat = "google-noto-sans-cjk-fonts";
                }
        }

There, it handles Fedora different than RHEL/CentOS, and, for Fedora,
it checks the release version to make the code compatible with
different versions.

Regards,
Mauro

      reply	other threads:[~2024-05-31  8:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  6:19 [PATCH] scripts/sphinx-pre-install: fix incorrect package names for openSUSE Danish Prakash
2024-05-31  8:49 ` Mauro Carvalho Chehab [this message]

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=20240531104919.18504578@coco.lan \
    --to=mchehab@kernel.org \
    --cc=contact@danishpraka.sh \
    --cc=corbet@lwn.net \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=skhan@linuxfoundation.org \
    /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