public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] scripts/sphinx-pre-install: fix incorrect package names for openSUSE
@ 2024-05-31  6:19 Danish Prakash
  2024-05-31  8:49 ` Mauro Carvalho Chehab
  0 siblings, 1 reply; 2+ messages in thread
From: Danish Prakash @ 2024-05-31  6:19 UTC (permalink / raw)
  Cc: Shuah Khan, Danish Prakash, Jonathan Corbet,
	Mauro Carvalho Chehab, open list:DOCUMENTATION, open list

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",
-- 
2.45.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] scripts/sphinx-pre-install: fix incorrect package names for openSUSE
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2024-05-31  8:49 UTC (permalink / raw)
  To: Danish Prakash
  Cc: Shuah Khan, Jonathan Corbet, open list:DOCUMENTATION, open list

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-31  8:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox