fix depmod ERROR problem

Signed-off-by: 白凤 <maxiaofeng14@h-partners.com>
This commit is contained in:
白凤 2024-10-09 06:18:44 +00:00 committed by Gitee
parent 70231b4976
commit 79b4f2b9e0
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,7 +1,7 @@
Name: kae
Summary: Huawei Kunpeng Accelerator Engine Zip
Version: 2.0.0
Release: 4
Release: 7
License: GPL-2.0
Source: %{name}-%{version}.tar.gz
ExclusiveOS: linux
@ -297,8 +297,8 @@ if [ "$1" = "0" ] ; then #0: uninstall
fi
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/uacce.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_qm.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/uacce.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
echo "/lib/modules/%{kernel_version}/extra/hisi_qm.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
/sbin/depmod -a > /dev/null 2>&1 || true
if [ "$1" = "0" ] ; then #0: uninstall
@ -306,21 +306,21 @@ if [ "$1" = "0" ] ; then #0: uninstall
fi
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/hisi_sec2.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_sec2.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
if [ "$1" = "0" ] ; then #0: uninstall
echo "hisi_sec2 modules uninstalling"
fi
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/hisi_hpre.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_hpre.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
if [ "$1" = "0" ] ; then #0: uninstall
echo "hisi_hpre modules uninstalling"
fi
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/hisi_zip.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_zip.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
if [ "$1" = "0" ] ; then #0: uninstall
echo "hisi_zip modules uninstalling"
@ -336,7 +336,7 @@ echo "uacce modules uninstalled"
if [ "$1" = "0" ] ; then #0: uninstall
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/hisi_sec2.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_sec2.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
/sbin/depmod -a > /dev/null 2>&1 || true
fi
@ -344,7 +344,7 @@ echo "hisi_sec2 modules uninstalled"
if [ "$1" = "0" ] ; then #0: uninstall
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/hisi_hpre.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_hpre.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
/sbin/depmod -a > /dev/null 2>&1 || true
fi
@ -352,7 +352,7 @@ echo "hisi_hpre modules uninstalled"
if [ "$1" = "0" ]; then #0: uninstall
if [ -e /sbin/weak-modules ]; then
echo "/lib/modules/%{kernel_version}/extra/hisi_zip.ko" | /sbin/weak-modules --remove-module --no-initramfs
echo "/lib/modules/%{kernel_version}/extra/hisi_zip.ko" | /sbin/weak-modules --remove-module --no-initramfs > /dev/null 2>&1 || true
fi
/sbin/depmod -a > /dev/null 2>&1 || true
fi
@ -497,6 +497,9 @@ fi
%changelog
* Wed Oct 09 2024 maxiaofeng <maxiaofeng14@h-partners.com> 2.0.0-7
- Hide print while uninstall *.ko after update kernel version
* Tue Dec 12 2023 liuyang <liuyang645@huawei.com> 2.0.0-4
- Second Spec Version Include kunpeng accelerator engine Code