You are not logged in.

#1 2009-10-30 08:16:06

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

[Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

Hi all.
Did a pacman -Syu yesterday, havn't done this for a while. After this, whenever starting a login shell, I'm getting the following:

-bash: /etc/profile.d/bash_completion.sh: No such file or directory

It seems to be caused by sourcing /etc/profile. Now, my /etc/profile hasn't been changed.

[ndlarsen@slave ~]$ . /etc/profile
-bash: /etc/profile.d/bash_completion.sh: No such file or directory

[ndlarsen@slave ~]$ pacman -Qo /etc/profile
/etc/profile is owned by filesystem 2009.07-1

[ndlarsen@slave ~]$ pacman -Ss filesystem | grep core/filesystem
core/filesystem 2009.07-1 (base)

[ndlarsen@slave ~]$ pacman -Qk filesystem
filesystem: 89 total files, 0 missing file(s)

[ndlarsen@slave ~]$ pacman -Q bash-completion
bash-completion 1.0-3

[ndlarsen@slave ~]$ pacman -Ss bash-completion
extra/bash-completion 1.0-3
    Programmable completion for the bash shell

[ndlarsen@slave ~]$ pacman -Qk bash-completion
bash-completion: 45 total files, 0 missing file(s)

Now, I'm wondering if this is a bug or feature and what to do about it.
Cheers.

Last edited by ndlarsen (2009-10-30 12:32:54)


I made it long
as I lacked the time to make it short...

Offline

#2 2009-10-30 08:19:05

pacman
Member
Registered: 2009-10-30
Posts: 10

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

pastebin /etc/profile

Offline

#3 2009-10-30 08:58:32

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

ndlarsen wrote:

It seems to be caused by sourcing /etc/profile. Now, my /etc/profile hasn't been changed.

[ndlarsen@slave ~]$ wget -O profile http://repos.archlinux.org/wsvn/packages/filesystem/repos/core-i686/profile?op=dl&rev=0
[ndlarsen@slave ~]$ diff profile /etc/profile && echo ...Done...
...Done...

I made it long
as I lacked the time to make it short...

Offline

#4 2009-10-30 10:11:26

pacman
Member
Registered: 2009-10-30
Posts: 10

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

this

if test -d /etc/profile.d/; then
        for profile in /etc/profile.d/*.sh; do
                test -x $profile && . $profile
        done
        unset profile
fi

is the only part that touches that dir. it doesnt specify a file name...

so it's /etc/profile.bash or /etc/bash.bashrc

Last edited by pacman (2009-10-30 10:12:27)

Offline

#5 2009-10-30 10:46:13

chpln
Member
From: Australia
Registered: 2009-09-17
Posts: 361

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

Well, no package seems to provide /etc/profile.d/bash_completion.sh.  I'm suspecting it's being sourced (maybe indirectly) by an out-of-date script in /etc/profile.d/.

A few things to try:

Run bash with '--norc'.

Check for explicit sourcing:

$ grep bash_completion.sh /etc/profile.d/*

Modify line 52 of /etc/profile to output the profile before sourcing it:

test -x $profile && echo $profile && . $profile

Last edited by chpln (2009-10-30 10:47:09)

Offline

#6 2009-10-30 10:55:09

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

Correct, seems to be caused by /etc/profile.bash, which I neither have messed with, though difers for some reason.

[ndlarsen@slave ~]$ . /etc/profile.bash 
-bash: /etc/profile.d/bash_completion.sh: No such file or directory

[ndlarsen@slave ~]$ wget -O profile.bash http://repos.archlinux.org/wsvn/packages/bash/repos/core-i686/profile.bash?op=dl&rev=0
[ndlarsen@slave ~]$ diff profile.bash /etc/profile.bash; echo ..Done...
25a26,29
> 
> #. bash_completion
> . /etc/profile.d/bash_completion.sh
> 
..Done...

[ndlarsen@slave ~]$ pacman -Qo /etc/profile.bash 
/etc/profile.bash is owned by bash 4.0.033-1
[ndlarsen@slave ~]$ pacman -Q bash
bash 4.0.033-1

Wonder if the devs have made changes to the svn entries.

Last edited by ndlarsen (2009-10-30 10:57:11)


I made it long
as I lacked the time to make it short...

Offline

#7 2009-10-30 11:02:52

pacman
Member
Registered: 2009-10-30
Posts: 10

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

profile.bash or bash.bashrc should source /etc/bash_completion instead, if you have it installed

Offline

#8 2009-10-30 11:05:42

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

Well, it seems that it was provided by bash-completion-1.0-2 but removed in version 1.0-3, no idea why atm.


I made it long
as I lacked the time to make it short...

Offline

#9 2009-10-30 11:43:11

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

So, /etc/profile.bash wasn't replaced when I updated from 4.0.028-1 to 4.0.033-1. There are no errors in /var/log/pacman.log related to this.  What should the correct permissions for /etc/profile.bash be?

[ndlarsen@slave ~]$ ls -l /etc/profile.bash 
-rw-r--r-- 1 root root 675 2009-08-25 08:49 /etc/profile.bash

Last edited by ndlarsen (2009-10-30 11:43:57)


I made it long
as I lacked the time to make it short...

Offline

#10 2009-10-30 12:29:18

pacman
Member
Registered: 2009-10-30
Posts: 10

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

rw-r-r

you dont have pacsave or pacnew files?

bash completion isnt sourced as it used to be, you've had to modify profile.bash at one point because that file has never sourced bash completion that way smile

Last edited by pacman (2009-10-30 12:29:38)

Offline

#11 2009-10-30 12:31:35

ndlarsen
Member
From: Denmark
Registered: 2005-11-02
Posts: 157

Re: [Solved] -bash: /etc/profile.d/bash_completion.sh: No such file or ...

Nope, no pacsave or pacnew files. Anyway, if I have I forgot about it. Well, going to edit it.
Cheers.


I made it long
as I lacked the time to make it short...

Offline

Board footer

Powered by FluxBB