В Tue, 09 Apr 2013 11:36:53 +0200 Takashi Iwai <tiwai@suse.de> пишет:
At Tue, 09 Apr 2013 02:31:13 -0300, Cristian Rodríguez wrote:
On 04/09/2013 12:38 AM, Andrey Borzenkov wrote:
Apparently on openSUSE /etc/bash.bashrc sources only completion scripts with .sh suffix. It is fine but some packages install them without suffix (I wondered why completions were missing). Does it warrant rpmlint check?
On a related note, some completions use "have" function to check for command existence. Seems it was introduced in Debian. Would it make sense to add this to /etc/bash.bashrc to avoid need to patch every program? This comes unnoticed currently because two completions on my system that use "have" also do not have .sh suffix :)
Looks like a bug..not a bug in packages but a bug in $component that is deciding to parse only files with .sh suffix.
Including only files with the known good extension is a saner way. Think of backup files, *.rpmorig or whatever.
I'm afraid situation is more complicated. There is default /etc/bash.bashrc that sources /etc/bash_completion.d/*.sh There is also bash-completion package that provides additional framework for creating user completions and sources *everything* under /etc/bash_completion.d/*.sh. So installing bash-completion fixed my problem with missing completions too :) bash-completion is not installed by default. But apparently quite a number of existing completions rely on helper functions defined in bash-completion and simply do not work without it. So they must not be source by /etc/bash.bashrc either, but by bash-completion main script. Are there any guidelines how bash completions should be packaged? I.e. given that bash-completion is not installed by default making packages pull it in is probably wrong. OTOH split single script into ${name}-bash-completion that Requires bash-completion looks rather silly as well. But I'm fine with it if you say it is the way to go. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org