diff --git a/kmod.spec b/kmod.spec index 1fd44aab4b725228877d450b280047429ecfb1d4..b588102bc24b6cb956a1380fdce1454b082fc287 100644 --- a/kmod.spec +++ b/kmod.spec @@ -1,6 +1,6 @@ Name: kmod Version: 27 -Release: 8 +Release: 9 Summary: Kernel module management # GPLv2+ is used by programs, LGPLv2+ is used for libraries. License: GPLv2+ and LGPLv2+ @@ -111,6 +111,9 @@ install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/depmod.d/dist.conf %doc TODO NEWS README %changelog +* Fri Aug 13 2021 YangYanchao - 27-9 +- weak-modules: disable an error when /lib/modules/`uname -r`/weak-modules does not exist + * Wed Apr 7 2021 YangYanchao - 27-8 - backport weak-modules script from fedora diff --git a/weak-modules b/weak-modules index 65806d0516d31ba910c84ad3b78b5b7901a8c09d..7ba26bbbc52b1d8ca80b60ad0700c1af82a3c48d 100644 --- a/weak-modules +++ b/weak-modules @@ -1078,7 +1078,9 @@ remove_kernel() { module_has_changed $weak_modules $remove_krel # Remove everything beneath the weak-updates directory - ( cd "$weak_modules" && doit rm -rf * ) + if [ -d "weak_modules" ]; then + ( cd "$weak_modules" && doit rm -rf * ) + fi } ################################################################################