dkms/dkms-2.3-dont_fail_if_module_source_removed.patch

25 lines
964 B
Diff
Raw Normal View History

diff -ru dkms-2.3/dkms dkms-2.3.patched/dkms
--- dkms-2.3/dkms 2016-12-17 17:42:56.000000000 +0100
+++ dkms-2.3.patched/dkms 2016-12-17 17:47:06.448995920 +0100
@@ -512,8 +512,11 @@
[[ $conf ]] && read_conf_file="$conf"
[[ $3 ]] && read_conf_file="$3"
+ [[ ! -r $read_conf_file && -r $dkms_tree/$module/$module_version/build/dkms.conf ]] && \
+ read_conf_file="$dkms_tree/$module/$module_version/build/dkms.conf"
+
[[ -r $read_conf_file ]] || die 4 $"Could not locate dkms.conf file." \
- $"File: $conf does not exist."
+ $"File: $read_conf_file does not exist."
[[ $last_mvka = $module/$module_version/$1/$2 && \
$last_mvka_conf = $(readlink -f $read_conf_file) ]] && return
@@ -1550,6 +1553,7 @@
is_module_added() {
[[ $1 && $2 ]] || return 1
[[ -d $dkms_tree/$1/$2 ]] || return 2
+ [[ -d $dkms_tree/$1/$2/source/ ]] || return 2
[[ -L $dkms_tree/$1/$2/source || -d $dkms_tree/$1/$2/source ]];
}