SRU? bashism in startkde

Bug #688518 reported by Achim Bohnet on 2010-12-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Kubuntu PPA
kdebase-workspace (Ubuntu)
Scott Kitterman

Bug Description

== test operator is not defined in posix shell /bin/sh -> dash

== is used 2 times in startkde:

(0)allee@alleehol:~$ grep -n == /usr/bin/start*
/usr/bin/startkde:238: if `laptop-detect` && [ $HEIGHT -lt 700 ] && [ $HEIGHT -gt 0 ] && [ -z $CDROM ] || [ $1 == "netbook" ]; then
/usr/bin/startkde:248: if [ "$1"=="mobile" ] ; then

Here == without space is used so even parsing is wrong as it's considered as one word not 3. As the work is not emtpy it evaluates to true:

(0)allee@alleehol:~$ /bin/sh
$ if [ "$1"=="mobile" ] ; then echo foo; fi
$ echo "$1"

Here the standard == bashism bug:

$ [ $1 == "netbook" ] && echo foo
[: 5: ==: unexpected operator

Achim Bohnet (allee) wrote :
Achim Bohnet (allee) wrote :

Opinion about a SRU as the bug is already in maverick kdebase-runtime-bin 4%3a4.5.1-0ubuntu8.

1.==: passing forcing netbook mode (test is in 'or' branch) as arg1 to startkde does not work. I assume more a developer /debug feature.

2.==: as soon as/usr/share/kubuntu-mobile-default-settings/share/autostart/plasma-mobile.desktop exits, KDEDIRS is always set to use mobile defaults. With the fix KDEDIR is only set if startkde is called with mobile as arg1.

So IMHO only extended (devel) feature are not working. Not worth a SRU on it's own. Better wait until something important is found and let bashism fix slip in then.

But the mobile and netbook users/devs have a different POV what is important.

Achim Bohnet (allee) on 2010-12-10
Changed in kubuntu-ppa:
status: New → Fix Committed
Achim Bohnet (allee) on 2010-12-10
summary: - bashism in startkde
+ SRU? bashism in startkde
tags: added: patch
Philip Muškovac (yofel) wrote :

Fixed by Jonathan in Natty

kdebase-workspace (4:4.5.85-0ubuntu3) natty; urgency=low

  * Remove bashism in kubuntu_108_plasma_netbook_for_small_screens.diff,
    thanks to Achim

 -- Jonathan Riddell <email address hidden> Fri, 10 Dec 2010 12:29:26 +0000

Changed in kdebase-workspace (Ubuntu):
status: New → Fix Released
Changed in kdebase-workspace (Ubuntu Maverick):
assignee: nobody → Scott Kitterman (kitterman)
importance: Undecided → Medium
milestone: none → maverick-updates
status: New → In Progress

Accepted into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

Changed in kdebase-workspace (Ubuntu Maverick):
status: In Progress → Fix Committed
Achim Bohnet (allee) wrote :

Brown paper bag on :( On the good side only a developer debugging feature does not work as expected.

My patch was not complete. Additionally $1 in [ $1 = "netbook" ] need to be quoted. With the maverick-proposed pkgs I still get in .xsession-errors

Start IM through /etc/X11/xinit/xinput.d/all_ALL linked to /etc/X11/xinit/xinput.d/default.
[: 225: =: unexpected operator
startkde: Starting up...

That due to $1 not defined when startkde is started by kdm.

root@lap-allee:~# dash
# [ $x = 'bla' ] && echo foo
[: 3: =: unexpected operator
# x=foo
# [ $x = 'bla' ] && echo foo

Appended patch fixes it.

Achim Bohnet (allee) wrote :
Scott Kitterman (kitterman) wrote :

Maverick correction uploaded.

Martin Pitt (pitti) wrote :

Accepted kdebase-workspace into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kdebase-workspace - 4:4.5.5-0ubuntu2.1

kdebase-workspace (4:4.5.5-0ubuntu2.1) maverick-proposed; urgency=low

  * Fix missing quotes in kubuntu_108_plasma_netbook_for_small_screens.diff
    - Fixing LP: #688518 a little harder
 -- Scott Kitterman <email address hidden> Thu, 14 Apr 2011 11:04:50 -0400

Changed in kdebase-workspace (Ubuntu Maverick):
status: Fix Committed → Fix Released
demilord (demilord) wrote :

this patch should be ported to kubuntu 11.04

Scott Kitterman (kitterman) wrote :

It already is.


Bedankt voor je mail! Ik ben er even tussenuit geknepen naar een lekker warm land! Ik beantwoord je mail na mijn vakantie (11 oktober).



Philip Muškovac (yofel) on 2011-10-03
Changed in kubuntu-ppa:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers