check weak-updates directory exists before using it

Resolves: RHEL-106279
Signed-off-by: Jan Stancek <jstancek@redhat.com>
This commit is contained in:
Jan Stancek 2025-08-18 14:50:45 +02:00
parent 65e12d75f3
commit e820306e99
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
Name: kmod Name: kmod
Version: 28 Version: 28
Release: 10%{?dist} Release: 11%{?dist}
Summary: Linux kernel module management utilities Summary: Linux kernel module management utilities
License: GPLv2+ License: GPLv2+
@ -119,6 +119,10 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf
%{_libdir}/libkmod.so %{_libdir}/libkmod.so
%changelog %changelog
* Mon Aug 18 2025 Jan Stancek <jstancek@redhat.com> - 28-11
- check weak-updates directory exists before using it
- Resolves: RHEL-106279
* Thu Aug 15 2024 Eugene Syromiatnikov <esyr@redhat.com> - 28-10 * Thu Aug 15 2024 Eugene Syromiatnikov <esyr@redhat.com> - 28-10
- Fix issues discovered by static analysis - Fix issues discovered by static analysis
- Resolves: RHEL-34073 - Resolves: RHEL-34073

View File

@ -1083,7 +1083,7 @@ remove_kernel() {
module_has_changed $weak_modules $remove_krel module_has_changed $weak_modules $remove_krel
# Remove everything beneath the weak-updates directory # Remove everything beneath the weak-updates directory
( cd "$weak_modules" && doit rm -rf * ) ( [ -d "$weak_modules" ] && cd "$weak_modules" && doit rm -rf * )
} }
################################################################################ ################################################################################