Mailinglist Archive: opensuse-bugs (7842 mails)

< Previous Next >
[Bug 471321] New: aaa_base causes root login to display "-bash: test: too many arguments" when a directory containing spaces is created under /opt
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Sat, 31 Jan 2009 20:07:00 -0700 (MST)
  • Message-id: <bug-471321-21960@xxxxxxxxxxxxxxxxxxxxxxxxx/>
https://bugzilla.novell.com/show_bug.cgi?id=471321


Summary: aaa_base causes root login to display "-bash: test:
too many arguments" when a directory containing spaces
is created under /opt
Classification: openSUSE
Product: openSUSE 11.1
Version: Final
Platform: All
OS/Version: openSUSE 11.1
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Basesystem
AssignedTo: bnc-team-screening@xxxxxxxxxxxxxxxxxxxxxx
ReportedBy: contact@xxxxxxxxxxxxxxxxx
QAContact: qa@xxxxxxx
Found By: ---


User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.0.5)
Gecko/2008121300 SUSE/3.0.5-1.1 Firefox/3.0.5

I installed Adobe AIR FLIP.
It resides in /opt/Adobe AIR FLIP (yes, it contains spaces).

I didn't track the reason for the "-bash: test: too many arguments" appearing
every time I log in as root, but some echo commands added to /etc/profile
identified the problem.

Reproducible: Always

Steps to Reproduce:
1. Create a directory with spaces in it's name, such as "/opt/a b c"
2. Log in as root (for example in konsole).
Actual Results:
-bash: test: too many arguments

Expected Results:
A clean prompt

I tracked the problem down to /etc/profile.d/xdg-environment.sh

for xdgdir in /usr/local/share /usr/share /etc/opt/*/share /opt/*/share
/usr/share/gnome ; do
if test -d $xdgdir && test -d $xdgdir/applications; then
if test -z "$XDG_DATA_DIRS"; then
XDG_DATA_DIRS="$xdgdir"
else
XDG_DATA_DIRS="$XDG_DATA_DIRS:$xdgdir"
fi
fi
done

The first "test" line should be changed to
if test -d "$xdgdir" -a -d "$xdgdir"/applications; then

This fixes the problem.

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >