!80 fix uninstall problem: depmod: ERROR: fstatat(4, uacce.ko): No such file or directory

From: @wizardWithSword 
Reviewed-by: @xqm227 
Signed-off-by: @xqm227
This commit is contained in:
openeuler-ci-bot 2024-10-12 02:40:08 +00:00 committed by Gitee
commit 5c30391455
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