[opensuse] SuSEconfig --module gtk2 Errors - how do I fix them?
Listmates, On 11.0 SuSEconfig is throwing errors when running the gtk2 module. What do these error mean and how do I fix them? [09:55 alchemy:/home/david/.themes] # SuSEconfig --module gtk2 Starting SuSEconfig, the SuSE Configuration Tool... Running module gtk2 only Reading /etc/sysconfig and updating the system... Executing /sbin/conf.d/SuSEconfig.gtk2... /sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Azenis: binary operator expected /sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Azenis: binary operator expected gtk-update-icon-cache: The generated cache was invalid. /sbin/conf.d/SuSEconfig.gtk2: line 67: test: too many arguments gtk-update-icon-cache: The generated cache was invalid. gtk-update-icon-cache: The generated cache was invalid. /sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Royal: binary operator expected gtk-update-icon-cache: The generated cache was invalid. Finished. Poking around, the names that give the errors don't have spaces in them so that can be eliminated, and after that, I'm lost as to what SuSEconfig may be looking for. Any help will be appreciated. -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 05 May 2010 10:05:07 -0500, "David C. Rankin" <drankinatty@suddenlinkmail.com> wrote:
/sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Azenis: binary operator expected /sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Azenis: binary operator expected /sbin/conf.d/SuSEconfig.gtk2: line 67: test: too many arguments /sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Royal: binary operator expected
Look closely at line 67 of that shell script. Something is missing so the shell complains. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello, On Wed, 05 May 2010, David C. Rankin wrote: [..]
/sbin/conf.d/SuSEconfig.gtk2: line 67: test: /usr/share/icons/Royal: binary operator expected gtk-update-icon-cache: The generated cache was invalid. Finished.
Poking around, the names that give the errors don't have spaces in them so that can be eliminated,
Sure? There's exactly one 'test' in line 67: test -f $SUBDIR/icon-theme.cache and that fails on unquoted spaces in the argument, as -f expects _one_ argument. Compare with: $ test -f foo bar test: foo: binary operator expected
and after that, I'm lost as to what SuSEconfig may be looking for. Any help will be appreciated.
David, try this patch: --- /sbin/conf.d/SuSEconfig.gtk2~ 2010-01-21 22:52:34.000000000 +0100 +++ /sbin/conf.d/SuSEconfig.gtk2 2010-05-05 23:02:47.000000000 +0200 @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Copyright (c) 2002 SuSE Gmbh Nuernberg, Germany. All rights reserved. # # Author: Holger Hetterich <hhetter@suse.de>, 2002 @@ -46,8 +46,8 @@ # directories with icon-theme.cache after removing themes. if test -f $r/var/cache/gtk-2.0/icon-theme.cache-list ; then for DIR in $(<$r/var/cache/gtk-2.0/icon-theme.cache-list) ; do - if test $(ls -1 "$DIR" | wc --lines) -le 1 -a -f $DIR/icon-theme.cache; then - rm -f $DIR/icon-theme.cache + if test $(ls -1 "$DIR" | wc -l) -le 1 -a -f "${DIR}/icon-theme.cache"; then + rm -f "${DIR}/icon-theme.cache" rmdir --ignore-fail-on-non-empty "$DIR" fi done @@ -60,12 +60,12 @@ . $r/etc/profile fi IFS="$IFS:" - for DIR in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do - for SUBDIR in $DIR/icons/* ; do + for DIR in "${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" ; do + for SUBDIR in "${DIR}/icons"/* ; do if test ! -L "$SUBDIR" -a -d "$SUBDIR" ; then /usr/bin/gtk-update-icon-cache --quiet --ignore-theme-index "$SUBDIR" - if test -f $SUBDIR/icon-theme.cache ; then - echo $SUBDIR >>$r/var/cache/gtk-2.0/icon-theme.cache-list + if test -f "${SUBDIR}/icon-theme.cache" ; then + echo "$SUBDIR" >> /var/cache/gtk-2.0/icon-theme.cache-list fi fi done ==== With that, it run's here. Otherwise, you'll need to mail the remaining errors. -dnh -- Never attribute to malice that which can be adequately explained by stupidity. -- Hanlon's razor -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Wed, 05 May 2010, David Haller wrote:
With that, it run's here. ^*AIGHHHH*
-dnh, crawling to the nearest corner, curling up into a ball and starting to sob -- Aaaah! I feel insanity approaching. On a Unicycle. Backwards. -- Tanuki -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 05/05/2010 04:28 PM, David Haller wrote:
Hello,
David, try this patch:
--- /sbin/conf.d/SuSEconfig.gtk2~ 2010-01-21 22:52:34.000000000 +0100 +++ /sbin/conf.d/SuSEconfig.gtk2 2010-05-05 23:02:47.000000000 +0200 @@ -1,4 +1,4 @@ -#! /bin/sh +#! /bin/bash # Copyright (c) 2002 SuSE Gmbh Nuernberg, Germany. All rights reserved. # # Author: Holger Hetterich <hhetter@suse.de>, 2002 @@ -46,8 +46,8 @@ # directories with icon-theme.cache after removing themes. if test -f $r/var/cache/gtk-2.0/icon-theme.cache-list ; then for DIR in $(<$r/var/cache/gtk-2.0/icon-theme.cache-list) ; do - if test $(ls -1 "$DIR" | wc --lines) -le 1 -a -f $DIR/icon-theme.cache; then - rm -f $DIR/icon-theme.cache + if test $(ls -1 "$DIR" | wc -l) -le 1 -a -f "${DIR}/icon-theme.cache"; then + rm -f "${DIR}/icon-theme.cache" rmdir --ignore-fail-on-non-empty "$DIR" fi done @@ -60,12 +60,12 @@ . $r/etc/profile fi IFS="$IFS:" - for DIR in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do - for SUBDIR in $DIR/icons/* ; do + for DIR in "${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" ; do + for SUBDIR in "${DIR}/icons"/* ; do if test ! -L "$SUBDIR" -a -d "$SUBDIR" ; then /usr/bin/gtk-update-icon-cache --quiet --ignore-theme-index "$SUBDIR" - if test -f $SUBDIR/icon-theme.cache ; then - echo $SUBDIR >>$r/var/cache/gtk-2.0/icon-theme.cache-list + if test -f "${SUBDIR}/icon-theme.cache" ; then + echo "$SUBDIR" >> /var/cache/gtk-2.0/icon-theme.cache-list fi fi done ====
With that, it run's here. Otherwise, you'll need to mail the remaining errors.
-dnh
Dave, You and your patch rock! I don't know why, but I always consider suse's magic SuSEconfig... files to be stripped binaries and a load of bricks has to fall on my head to break that mindset. Thanks for the load of bricks :p There was a little hickie applying the patch. I know it had to be something I f'ed up because I always have that type of love/hate relationship with diff/patch: [17:34 alchemy:/] # patch -p0< home/david/suse/pkg/patch/susecfg.gtk2.patch patching file /sbin/conf.d/SuSEconfig.gtk2 Hunk #3 FAILED at 60. 1 out of 3 hunks FAILED -- saving rejects to file /sbin/conf.d/SuSEconfig.gtk2.rej bummer :-( apply it manually ) [18:10 alchemy:/sbin/conf.d] # diff SuSEconfig.gtk2 SuSEconfig.gtk2.manApp 6c6 < # SuSEconfig.gtk: this script will generate a /etc/gtk-2.0/gtk.immodules file ---
# SuSEconfig.gtk: this script will generate a /etc/gtk-2.0/gtk.immodules file 48a49,50 # if test $(ls -1 "$DIR" | wc --lines) -le 1 -a -f $DIR/icon-theme.cache; then # rm -f $DIR/icon-theme.cache 63,64c65,68 < for DIR in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do < for SUBDIR in $DIR/icons/* ; do
# for DIR in ${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/} ; do # for SUBDIR in $DIR/icons/* ; do for DIR in "${XDG_DATA_DIRS:-/usr/local/share/:/usr/share/}" ; do for SUBDIR in "${DIR}/icons"/* ; do 67,68c71,74 < if test -f $SUBDIR/icon-theme.cache ; then < echo $SUBDIR >>$r/var/cache/gtk-2.0/icon-theme.cache-list
# if test -f $SUBDIR/icon-theme.cache ; then # echo $SUBDIR >>$r/var/cache/gtk-2.0/icon-theme.cache-list if test -f "${SUBDIR}/icon-theme.cache" ; then echo "$SUBDIR" >> /var/cache/gtk-2.0/icon-theme.cache-list 75c81 < exit 0
exit 0
Okay, now a bit of housekeeping: mv SuSEconfig.gtk2 SuSEconfig.gtk2.saving cp SuSEconfig.gtk2.manApp SuSEconfig.gtk2 chmod 0755 SuSEconfig.gtk2 Now the test with the patched SuSEconfig.gtk2: [18:13 alchemy:/] # SuSEconfig --module gtk2 Starting SuSEconfig, the SuSE Configuration Tool... Running module gtk2 only Reading /etc/sysconfig and updating the system... Executing /sbin/conf.d/SuSEconfig.gtk2... Finished. WTF ... Wow! That finished in less than 3 seconds instead of being stuck for 90 seconds (smells like 3 30 second timeouts now). I can't believe it. The patched SuSEconfig.gtk2 works like a champ. Thank you so much for the help. Sorry for the delay getting back with you, my brother was down for the weekend to show me up ... it would seem. But -- I don't mind: http://www.3111skyline.com/dl/img/misc/drr/drr-nac-5.5lb-20100515_3.jpg (warning: it will make you jealous ;-) -- David C. Rankin, J.D.,P.E. Rankin Law Firm, PLLC 510 Ochiltree Street Nacogdoches, Texas 75961 Telephone: (936) 715-9333 Facsimile: (936) 715-9339 www.rankinlawfirm.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello, On Sun, 16 May 2010, David C. Rankin wrote:
On 05/05/2010 04:28 PM, David Haller wrote:
David, try this patch: [..] You and your patch rock!
Thanks.
I don't know why, but I always consider suse's magic SuSEconfig... files to be stripped binaries and a load of bricks has to fall on my head to break that mindset. Thanks for the load of bricks :p
You're welcome!
There was a little hickie applying the patch. I know it had to be something I f'ed up because I always have that type of love/hate relationship with diff/patch:
[17:34 alchemy:/] # patch -p0< home/david/suse/pkg/patch/susecfg.gtk2.patch patching file /sbin/conf.d/SuSEconfig.gtk2 Hunk #3 FAILED at 60. 1 out of 3 hunks FAILED -- saving rejects to file /sbin/conf.d/SuSEconfig.gtk2.rej
Probably some whitespace stuff (tabs in the script, spaces in to-be-removed-lines in the mail) not matching. 'patch -l' should help in those cases. Should've sent it as attachment.
bummer :-( apply it manually )
Well, as I always say: Quote your variables ;) And good that it was such a simple "diff". [..]
Now the test with the patched SuSEconfig.gtk2:
[18:13 alchemy:/] # SuSEconfig --module gtk2 [..] Finished.
WTF ... Wow! That finished in less than 3 seconds instead of being stuck for 90 seconds (smells like 3 30 second timeouts now).
Yep.
I can't believe it. The patched SuSEconfig.gtk2 works like a champ. Thank you so much for the help.
*hehe*
http://www.3111skyline.com/dl/img/misc/drr/drr-nac-5.5lb-20100515_3.jpg
(warning: it will make you jealous ;-)
Nah. Can't stand fish ;) -dnh -- "I love the way Microsoft follows standards. In much the same manner that fish follow migrating caribou." -- Paul Tomblin, in ASR -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (3)
-
David C. Rankin
-
David Haller
-
Philipp Thomas