Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#4275 - Annoying errors on login.

Attached to Project: Arch Linux
Opened by Rohan Dhruva (rohandhruva) - Sunday, 26 March 2006, 05:42 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To No-one
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

When logging in, i get strange errors --

bash: [: [\u@\h: binary operator expected

The error appears twice when logging in from a vc (ctrl-alt-fn) and once when logging in from kde konsole. I think it is because of the /etc/profile.d/locale.sh script, because that is the only script that echos tab characters. The error was not there before, it appeared only after a recent upgrade. I use bash. The error is harmless, as far as i can determine.

Thanks.
This task depends upon

Closed by  arjan timmerman (blaasvis)
Sunday, 26 March 2006, 09:14 GMT
Reason for closing:  Fixed
Additional comments about closing:  will be fixed in 20060301-3
Comment by Rohan Dhruva (rohandhruva) - Sunday, 26 March 2006, 08:33 GMT
It has to be this line, since the error is identical. In /etc/profile :
export PS1='[\u@\h \W]\$ '
on line 18 .. Strange though, the same thing worked before ..
And the same thing is there in my .bashrc --
PS1='[\u@\h \W]\$ '

Can that be the reason for the error appearing two times in vc ?
Comment by arjan timmerman (blaasvis) - Sunday, 26 March 2006, 08:42 GMT
what shell are you using ?
Comment by arjan timmerman (blaasvis) - Sunday, 26 March 2006, 08:48 GMT
sorry should have read better.

well i am unable to reproduce it, are you using bash_completion ? i have updated bash and bash_completion yesterday.
Comment by Rohan Dhruva (rohandhruva) - Sunday, 26 March 2006, 08:55 GMT
I am using bash. And yes, I do use bash_completion, and my system is fully up-to-date. One more arch user (shastry) I talked to experiences the same problem.
Comment by Rohan Dhruva (rohandhruva) - Sunday, 26 March 2006, 09:05 GMT
Well,
chmod a-x /etc/profile.d/bash_completion.sh

solves the problem. Workabout, though, not a solution.
Comment by Rohan Dhruva (rohandhruva) - Sunday, 26 March 2006, 09:12 GMT
Ok, the problem is solved by changing the above file to read
if [ -z "$PS1" ]
i.e., add enclose PS1 in ""

Hope that helps...
Comment by Vinay S Shastry (shastry) - Sunday, 26 March 2006, 09:16 GMT
I'd say use [ x$PS1 = x ] to test for emptyness .. always ensures that theres no syntactical errors.

Loading...