Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 250792

Summary: app-shells/bash-completion-20060301-r3 installs script using bash-specific syntax in system-wide profile dir
Product: Gentoo Linux Reporter: Nick Bowler <nbowler>
Component: New packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED INVALID    
Severity: normal CC: matrix47
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Patch to fix issues with non-bash shells.

Description Nick Bowler 2008-12-13 03:29:36 UTC
As of the latest update, the bash-completion ebuild installs /etc/profile.d/bash-completion.sh.  This script is then run by shells other than bash (e.g. zsh) on startup, leading to a slew of errors.

Attached is a patch which
  (1) checks if the shell actually bash before running any of the script
  (2) corrects the syntax problems that cause errors in zsh.

Obviously (1) renders (2) redundant, but it's good style anyway.
Comment 1 Nick Bowler 2008-12-13 03:30:25 UTC
Created attachment 175173 [details, diff]
Patch to fix issues with non-bash shells.
Comment 2 Nick Bowler 2008-12-13 19:47:13 UTC
Sorry, turns out that I simply missed a config update.  What happened was that
the ebuild renamed /etc/profile.d/bash-completion (which isn't run by the default zprofile) to /etc/profile.d/bash-completion.sh (which is), and then posted a config update.

The updated script does not have such problems.
Comment 3 Santiago M. Mola (RETIRED) gentoo-dev 2008-12-14 12:11:50 UTC
Okay, closing the bug then.

Nick, thanks for reporting anyway ;-)