Re: Troubles in a multiple choice
Stefan Fiedler <[email protected]> Wed, 15 Nov 2006 20:41:39 +0100
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
Am Mittwoch, 15. November 2006 18:51 schrieb Luca: > Stefan Fiedler wrote: > > Hi Luca! > > > > There's only a problem with the time zone choice afaik. > > CFGTEMP_PKG_GLIBC_TZ contains a newline separated list, while it should > > contain a space separated; also use grep to filter out comments: > > CFGTEMP_PKG_GLIBC_TZ="Factory Factory_Setting \ > > `grep -v "^#" /usr/share/zoneinfo/zone.tab | \ > > while read a a tz desc ; do echo "$tz $tz" ; done | sort | tr '\n' ' '`" > > Also change the following line to: > > choice ROCKCFG_PKG_GLIBC_TIMEZONE Factory $CFGTEMP_PKG_GLIBC_TZ > > Then it should work as expected. Note that the default value has to be in > > the list too. Also description text must not contain spaces, used > > underscores instead. > > > > With best regards, > > Stefan Fiedler > > _______________________________________________ > > rock-devel mailing list > > [email protected] > > http://www.rocklinux.net/mailman/listinfo/rock-devel > > Hi Stefan, just tried this way: output (choosing Europe/Rome): > > Choose your timezone > <Europe/Riga> Europe/Rome > > > Yours, > Luca Works here: <Europe/Rome> Europe/Rome The kind of error you get indicates that there is one extra element in the argument list of choice, or one element missing. Maybe one or more quotes are wrong. A variant of the lines above that also works is: CFGTEMP_PKG_GLIBC_TZ=`grep -v "^#" /usr/share/zoneinfo/zone.tab | \ while read a a tz desc ; do echo $tz $tz ; done | sort` choice ROCKCFG_PKG_GLIBC_TIMEZONE Factory Factory "Factory Setting" $CFGTEMP_PKG_GLIBC_TZ Note the CFGTEMP part is split on two lines and the choice part is on one line. Btw. using whitespace in description texts is possible with proper quotes (contrary to what I said earlier). Yours, Stefan Fiedler