diff --git a/dkms.in b/dkms.in index 628b3cb1..ae24fe25 100644 --- a/dkms.in +++ b/dkms.in @@ -2214,8 +2214,11 @@ do_uninstall() module_is_broken_and_die() { is_module_broken "$module" "$module_version" && die 4 "$module/$module_version is broken!"\ - "Missing the source directory or the symbolic link pointing to it."\ - "Manual intervention is required!" + "Missing the source directory or the symbolic link pointing to it:"\ + "$dkms_tree/$module/$module_version/source"\ + "Manual intervention is required!"\ + "If this module version is no longer needed, you can remove the stale directory."\ + "Otherwise, reinstall the package that provides its source." } module_is_added_or_die() @@ -2561,8 +2564,11 @@ do_status() { case $status in broken) echo "$m/$v: $status" - error "$m/$v: Missing the module source directory or the symbolic link pointing to it."\ - "Manual intervention is required!" + error "$m/$v: Missing the module source directory or the symbolic link pointing to it:"\ + "$dkms_tree/$m/$v/source"\ + "Manual intervention is required!"\ + "If this module version is no longer needed, you can remove the stale directory."\ + "Otherwise, reinstall the package that provides its source." ;; added) echo "$m/$v: $status" @@ -2855,8 +2861,11 @@ run_match() # Continue if the status is broken, as there is nothing we can do if is_module_broken "$template_module" "$template_version"; then error "$template_module/$template_version is broken!"\ - "Missing the source directory or the symbolic link pointing to it."\ - "Manual intervention is required!" + "Missing the source directory or the symbolic link pointing to it:"\ + "$dkms_tree/$template_module/$template_version/source"\ + "Manual intervention is required!"\ + "If this module version is no longer needed, you can remove the stale directory."\ + "Otherwise, reinstall the package that provides its source." continue fi maybe_build_module "$template_module" "$template_version" "$kernelver" "$arch" @@ -3006,8 +3015,11 @@ autoinstall() { IFS='/' read -r m v k a <<< "$mvka" # If the module status is broken there is nothing that can be done if [[ $status = broken ]]; then - error "$m/$v is broken! Missing the source directory or the symbolic link pointing to it."\ - "Manual intervention is required!" + error "$m/$v is broken! Missing the source directory or the symbolic link pointing to it:"\ + "$dkms_tree/$m/$v/source"\ + "Manual intervention is required!"\ + "If this module version is no longer needed, you can remove the stale directory."\ + "Otherwise, reinstall the package that provides its source." continue fi if [[ ! ${latest[$m]} ]]; then diff --git a/run_test.sh b/run_test.sh index 48e27557..1f5a357b 100755 --- a/run_test.sh +++ b/run_test.sh @@ -403,7 +403,7 @@ case "${os_id}" in expected_dest_loc=updates mod_compression_ext=.zst ;; - arch) + arch | endeavouros) expected_dest_loc=updates/dkms ;; debian* | linuxmint) @@ -4418,8 +4418,11 @@ echo 'Checking broken status' run_with_expected_output dkms status dkms_test/1.0 << EOF dkms_test/1.0: broken -Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. +Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Re-adding the test module' @@ -4434,32 +4437,44 @@ echo 'Building broken test module (expected error)' run_with_expected_error 4 dkms build dkms_test/1.0 << EOF Error! dkms_test/1.0 is broken! -Missing the source directory or the symbolic link pointing to it. +Missing the source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Installing broken test module (expected error)' run_with_expected_error 4 dkms install dkms_test/1.0 << EOF Error! dkms_test/1.0 is broken! -Missing the source directory or the symbolic link pointing to it. +Missing the source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Unbuild broken test module (expected error)' run_with_expected_error 4 dkms unbuild dkms_test/1.0 << EOF Error! dkms_test/1.0 is broken! -Missing the source directory or the symbolic link pointing to it. +Missing the source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Uninstall broken test module (expected error)' run_with_expected_error 4 dkms uninstall dkms_test/1.0 << EOF Error! dkms_test/1.0 is broken! -Missing the source directory or the symbolic link pointing to it. +Missing the source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Adding the multiver test module 1.0 by directory' @@ -4473,16 +4488,22 @@ run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: added dkms_test/1.0: broken -Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. +Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Remove broken test module (expected error)' run_with_expected_error 4 dkms remove dkms_test/1.0 << EOF Error! dkms_test/1.0 is broken! -Missing the source directory or the symbolic link pointing to it. +Missing the source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Re-adding the test module' @@ -4497,8 +4518,11 @@ run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: added dkms_test/1.0: broken -Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it. +Error! dkms_test/1.0: Missing the module source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. EOF echo 'Removing dkms_multiver_test' @@ -4540,8 +4564,11 @@ EOF echo 'Running dkms autoinstall' run_with_expected_output dkms autoinstall -k "${KERNEL_VER}" << EOF -Error! dkms_multiver_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it. +Error! dkms_multiver_test/1.0 is broken! Missing the source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_multiver_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. Autoinstall of module dkms_test/1.0 for kernel ${KERNEL_VER} (${KERNEL_ARCH}) Installing /lib/modules/${KERNEL_VER}/${expected_dest_loc}/dkms_test.ko${mod_compression_ext} Running depmod... done. @@ -4551,8 +4578,11 @@ EOF run_with_expected_output dkms status << EOF dkms_multiver_test/1.0: broken -Error! dkms_multiver_test/1.0: Missing the module source directory or the symbolic link pointing to it. +Error! dkms_multiver_test/1.0: Missing the module source directory or the symbolic link pointing to it: +/var/lib/dkms/dkms_multiver_test/1.0/source Manual intervention is required! +If this module version is no longer needed, you can remove the stale directory. +Otherwise, reinstall the package that provides its source. dkms_multiver_test/2.0, ${KERNEL_VER}, ${KERNEL_ARCH}: built dkms_test/1.0, ${KERNEL_VER}, ${KERNEL_ARCH}: installed EOF