No man page provided via alternatives

Remove the man pages suffixed with '-c' that were provided through the
alternatives mechanism as they were only copies of the regular man pages
of Modules. No other 'module' implementation provides their manpages
through the alternatives mechanism, so it is safe to remove it. The man
pages for the compatibility version of Modules are provided with a
-compat suffix in the -compat package.
This commit is contained in:
Xavier Delaruelle 2021-02-16 09:29:24 +01:00
parent b59f759fc8
commit 93ae868516

View File

@ -108,8 +108,6 @@ touch %{buildroot}%{_sysconfdir}/profile.d/modules.{csh,sh}
touch %{buildroot}%{_bindir}/modulecmd touch %{buildroot}%{_bindir}/modulecmd
# remove modulecmd wrapper as it will be handled by alternatives # remove modulecmd wrapper as it will be handled by alternatives
rm -f %{buildroot}%{_datadir}/Modules/bin/modulecmd rm -f %{buildroot}%{_datadir}/Modules/bin/modulecmd
mv %{buildroot}%{_mandir}/man1/module{,-c}.1
mv %{buildroot}%{_mandir}/man4/modulefile{,-c}.4
# major utilities go to regular bin dir # major utilities go to regular bin dir
mv %{buildroot}%{_datadir}/Modules/bin/envml %{buildroot}%{_bindir}/ mv %{buildroot}%{_datadir}/Modules/bin/envml %{buildroot}%{_bindir}/
@ -136,8 +134,6 @@ make test
%post %post
# Cleanup from pre-alternatives # Cleanup from pre-alternatives
[ ! -L %{_mandir}/man1/module.1.gz ] && rm -f %{_mandir}/man1/module.1.gz
[ ! -L %{_mandir}/man4/modulefile.4.gz ] && rm -f %{_mandir}/man4/modulefile.4.gz
[ ! -L %{_sysconfdir}/profile.d/modules.sh ] && rm -f %{_sysconfdir}/profile.d/modules.sh [ ! -L %{_sysconfdir}/profile.d/modules.sh ] && rm -f %{_sysconfdir}/profile.d/modules.sh
[ ! -L %{_sysconfdir}/profile.d/modules.csh ] && rm -f %{_sysconfdir}/profile.d/modules.csh [ ! -L %{_sysconfdir}/profile.d/modules.csh ] && rm -f %{_sysconfdir}/profile.d/modules.csh
[ ! -L %{_bindir}/modulecmd ] && rm -f %{_bindir}/modulecmd [ ! -L %{_bindir}/modulecmd ] && rm -f %{_bindir}/modulecmd
@ -150,9 +146,7 @@ fi
%{_sbindir}/update-alternatives \ %{_sbindir}/update-alternatives \
--install %{_sysconfdir}/profile.d/modules.sh modules.sh %{_datadir}/Modules/init/profile.sh 40 \ --install %{_sysconfdir}/profile.d/modules.sh modules.sh %{_datadir}/Modules/init/profile.sh 40 \
--slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/profile.csh \ --slave %{_sysconfdir}/profile.d/modules.csh modules.csh %{_datadir}/Modules/init/profile.csh \
--slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd.tcl \ --slave %{_bindir}/modulecmd modulecmd %{_datadir}/Modules/libexec/modulecmd.tcl
--slave %{_mandir}/man1/module.1.gz module.1.gz %{_mandir}/man1/module-c.1.gz \
--slave %{_mandir}/man4/modulefile.4.gz modulefile.4.gz %{_mandir}/man4/modulefile-c.4.gz
%post compat %post compat
%{_sbindir}/update-alternatives \ %{_sbindir}/update-alternatives \
@ -193,10 +187,8 @@ fi
%{_datadir}/Modules/modulefiles %{_datadir}/Modules/modulefiles
%{_datadir}/modulefiles %{_datadir}/modulefiles
%{_mandir}/man1/ml.1.gz %{_mandir}/man1/ml.1.gz
%ghost %{_mandir}/man1/module.1.gz %{_mandir}/man1/module.1.gz
%ghost %{_mandir}/man4/modulefile.4.gz %{_mandir}/man4/modulefile.4.gz
%{_mandir}/man1/module-c.1.gz
%{_mandir}/man4/modulefile-c.4.gz
%{macrosdir}/macros.%{name} %{macrosdir}/macros.%{name}
%{vimdatadir}/ftdetect/modulefile.vim %{vimdatadir}/ftdetect/modulefile.vim
%{vimdatadir}/ftplugin/modulefile.vim %{vimdatadir}/ftplugin/modulefile.vim