[opensuse-packaging] Bash completion scripts without .sh suffix
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 :) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Tue, 9 Apr 2013 05:38, Andrey Borzenkov <arvidjaar@...> 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?
Shoutout: OSS_12.3, repo-oss, package aria2-1.16.1-2.1.1.x86_64 has file "/etc/bash_completion.d/aria2c" Thank you, Andrey, this ends my search for the missing completion. +1 for the rpmlint check. -Yamaban. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
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. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
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. Takashi -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
В 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
On Tue, Apr 9, 2013 at 11:10 AM, Andrey Borzenkov <arvidjaar@gmail.com> wrote:
В 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.
Sounds like the same Requires / Recommends / Suggests question I am facing. bash-completion is a small package (less than 1MB), if a package has completion syntax that requires it to work, then those packages should at a minimum Recommend bash-completions, and I argue they should Require it. fyi: My laptop has a full KDE install with lots of other packages but it did not have bash-completions installed. I would have expected it to be installed in a relatively full install like mine. Greg -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Greg Freemyer <greg.freemyer@gmail.com> writes:
bash-completion is a small package (less than 1MB), if a package has completion syntax that requires it to work, then those packages should at a minimum Recommend bash-completions, and I argue they should Require it.
But bash-completions has non-negligible runtime overhead. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, On Tue, 9 Apr 2013, Greg Freemyer wrote:
Sounds like the same Requires / Recommends / Suggests question I am facing.
bash-completion is a small package (less than 1MB), if a package has completion syntax that requires it to work, then those packages should at a minimum Recommend bash-completions, and I argue they should Require it.
Nope. bash-completion is horribly slow, I definitely don't want it. The normal completions are completely fine for me. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (7)
-
Andreas Schwab
-
Andrey Borzenkov
-
Cristian Rodríguez
-
Greg Freemyer
-
Michael Matz
-
Takashi Iwai
-
Yamaban