GNOME Bugzilla – Bug 127885
post-install of GConf breaks make ...
Last modified: 2005-08-15 01:37:00 UTC
gmake[3]: Leaving directory `/home/jonas/hacking-0.28.1/gnome/GConf/work/main.d/GConf-2.4.0.1' ==> Configuring cross-prefix GARNOME compatibility... if [ -x "`which gconftool-1 > /dev/null`" ]; then \ echo we have gc1; \ export GC1=$(dirname `gconftool-1 --get-default-source | cut -d : -f 3`); \ echo "xml:readonly:$GC1/gconf.xml.mandatory" >> /opt/gnome-2.6/etc/gconf/2/path ; \ echo "xml:readonly:$GC1/gconf.xml.defaults" >> /opt/gnome-2.6/etc/gconf/2/path ; \ fi /bin/sh: syntax error at line 1: `(' unexpected gmake[2]: *** [post-install] Error 2 gmake[2]: Leaving directory `/home/jonas/hacking-0.28.1/gnome/GConf' gmake[1]: *** [../../gnome/GConf/cookies/main.d/install] Error 2 gmake[1]: Leaving directory `/home/jonas/hacking-0.28.1/gnome/metacity' gmake: *** [../../gnome/metacity/cookies/main.d/install] Error 2 jonas@brusen:48~/hacking-0.28.1/meta/gnome-desktop>
/bin/sh on Solaris is not bash, so the construct using $(`cmd`) won't work. Change the script to use bash.
Created attachment 22446 [details] [review] How about this patch? Can't test it since I don't have a real sh to test with
I'll try running GARNOME with dash overnight. (Dash is the Debian Almquist Shell, which is a very minimal and POSIX compliant shell that is "useful for checking that a script uses only POSIX syntax." Adding the portability keyword.
Actually . . . there was no need for me to compile the whole thing, so I just copied and pasted the command into dash and it worked just fine (the output was "/etc/gconf"). Adding the PATCH keyword and upgrading the priority level to high.
Okay, actually(!) . . . The problem is not the lack of POSIX compliance in the script but the existence of an extraneous $ at the beginning of the $( thingy, because bash stumbles as well. There seem to be three instances of this: $ grep -rin \$\$\( garnome-0.29.1 garnome-0.29.1/Makefile:18: @echo "$@ started at $$(date)" >> $(BUILDLOG) garnome-0.29.1/Makefile:22: @echo "$@ completed at $$(date)" >> $(BUILDLOG) garnome-0.29.1/platform/GConf/Makefile:26: export GC1=$$(dirname `gconftool-1 --get-default-source | cut -d : -f 3`); \ So, which scripting extraordinaire wants to make (pun unintended, I swear!) a patch?
Alex: the double $$ is because 'make' eats one of them. There is no mystery (or bug) there. This bug appears to be obsolete, since there is no longer any code like this in garnome/gnome/GConf/Makefile. However, I am reluctant to close it myself, since I am not a garnome user. The existing GConf/Makefile stuff looks highly portable, though (assuming you are using GNU make).
Talked to Jeff. Confirmed this is indeed fixed. Closing.