Call depmod again to make sure all installed modules can be found

Without it, the DKMS-modules built before might have been missed.

For the same reason, kernel-<...>-devel package is now in Requires(post)
for kernel-<...>. The former must be installed completely before we call
depmod for the latter.
This commit is contained in:
Eugene Shatokhin 2015-04-23 11:54:19 +03:00
parent 3ea731f5fe
commit ba72441225

View file

@ -514,7 +514,8 @@ Conflicts: %kconflicts4 %kconflicts5 \
Provides: should-restart = system \
Suggests: crda \
%if %build_devel \
Suggests: %{kname}-%{1}-devel-%{buildrel} \
Requires: %{kname}-%{1}-devel-%{buildrel} \
Requires(post): %{kname}-%{1}-devel-%{buildrel} \
%endif \
%ifarch %{ix86} \
Conflicts: arch(x86_64) \
@ -1496,7 +1497,14 @@ EOF
# that is created then will be non-functional. But when the user installs
# kernel-<...> package, that defunct initrd will be replaced with a working
# one here.
#
# depmod is also needed, because some DKMS-modules might have been installed
# when the devel package was installed but that was before the main modules
# were installed.
# This is also the reason the devel package is in Requires(post) for this
# package now: it must be installed completely before we call depmod here.
cat > $kernel_files-post <<EOF
/sbin/depmod -a $KernelVer
INITRD=/boot/initrd-$KernelVer.img
/sbin/dracut -f \${INITRD} $KernelVer