fd2521 kdumpctl: Optimize _find_kernel_path_by_release regex string

1 file Authored by Lichen Liu 2 years ago, Committed by liutgnu 2 years ago,
1 file changed. 1 lines added. 1 lines removed.
    kdumpctl: Optimize _find_kernel_path_by_release regex string
    
    Resolves: bz2141536
    Upstream: Fedora
    Conflict: None
    
    commit 5eb77ee3fa986f39bb74a5956910aed6f60b8008
    Author: Lichen Liu <lichliu@redhat.com>
    Date:   Thu Nov 24 09:15:25 2022 +0800
    
        kdumpctl: Optimize _find_kernel_path_by_release regex string
    
        Currently _find_kernel_path_by_release uses grubby and grep to
        find the kernel path, if both the normal kernel and it's debug
        varient exist, the grep will give more than one kernel strings.
    
        ```
        kernel="/boot/vmlinuz-5.14.0-139.kpq0.el9.s390x+debug"
        kernel="/boot/vmlinuz-5.14.0-139.kpq0.el9.s390x"
        ```
    
        This will cause an error when installing debug kernel.
    
        ```
        The param "/boot/vmlinuz-5.14.0-139.kpq0.el9.s390x+debug
        /boot/vmlinuz-5.14.0-139.kpq0.el9.s390x" is incorrect
        ```
    
        Fixes: 945cbbd ("add helper functions to get kernel path by kernel release and the path of current running kernel")
    
        Signed-off-by: Lichen Liu <lichliu@redhat.com>
        Reviewed-by: Philipp Rudo <prudo@redhat.com>
    
    Signed-off-by: Lichen Liu <lichliu@redhat.com>
    
        
file modified
+1 -1