Bug 1221849

Summary: grub2 bash-completion failed with '_split_longopt: command not found'
Product: [openSUSE] openSUSE Tumbleweed Reporter: Gary Ching-Pang Lin <glin>
Component: BootloaderAssignee: Bootloader Maintainers <bootloader-maintainers>
Status: NEW --- QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: All   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: --- Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Gary Ching-Pang Lin 2024-03-22 07:27:33 UTC
After upgrading bash-completion to 2.12, grub2 bash-completion scripts stopped to work and showed the error: _split_longopt: command not found.

It's because bash-completion 2.12 renamed '_split_longopt' as '_comp__split_longopt', and bash-completion upstream(*) stated that '_split_longopt' is a private API so it should not be used directly. Instead, the script should use '_init_completion -s' or the newer '_comp_initialize -s' to initialize 'cur', 'prev', and 'split'.

(*) https://github.com/scop/bash-completion/issues/1135
Comment 1 Gary Ching-Pang Lin 2024-04-12 09:15:13 UTC
The patch was posted upstream and got the "reviewed-by" recently.
https://lists.gnu.org/archive/html/grub-devel/2024-03/msg00076.html

Submitted the fix to Base:System/grub2: sr#1166747