From 0d4fdeb204698f55b910bcf848ecee3c4e8a96b5 Mon Sep 17 00:00:00 2001 From: Yaraslau Furman Date: Tue, 19 Nov 2024 02:18:24 +0200 Subject: [PATCH] Warn the user if the major version was upgraded when _use_current is set It might be a good idea to regen the defconfig if the major version was updated --- PKGBUILD | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PKGBUILD b/PKGBUILD index 54f22a9..ff57231 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -173,6 +173,10 @@ apply_patches() { } copy_defconfig() { + local _cur_major_ver="$(zcat /proc/config.gz | grep Linux | grep -o '[0-9]*[0-9]\.[0-9]*[0-9]')" + [[ ${_cur_major_ver} != ${_kernel_major} ]] && + warning "Major version was updated, you should regen the defconfig" + if [[ -s /proc/config.gz ]]; then # modprobe configs zcat /proc/config.gz > ./.config @@ -293,6 +297,7 @@ create_defconfig() { prepare() { cd "${_src_linux}" || exit 1 + apply_patches [[ -n "${_use_current}" ]] && copy_defconfig