[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: debootstrap doesn't use configured categories/components



Kai Hendry wrote:
Instead I propose a parameter expansion. I'm a little wary of
parameter expansions as I rarely seem them in other shells except
bash, hence aren't they bashisms?

in general, expansions are not bashisms. some of them are posix (like the 'simple' ones: ${foo:-bar} etc.).

it's not accurate and covers false negatives, but a rule of thumb is that expansions of the form ${foo:#sign#bar} (where '#sign#' is something like -, +, #, etc.) are posix, whereas everything else is a special feature of the respective shell.

DEBOOTSTRAP_OPTIONS="${DEBOOTSTRAP_OPTIONS} --components
${LH_ARCHIVE_AREAS//[[:space:]]/,}"

however, this specific one is a bashism.

There is still a trailing comma if someone does a trailing space, e.g.

--archive-areas "main contrib non-free "

yep, that sort of sucks as well. now that we are 'free' again to break stuff in live-helper 2.0~a1 (where i'll be sending some roadmap and ideas somewhen in the next days), we have the possibility of cleaning that mess up and parse (and also sanitize) arguments/options once lh is invoked (rather than for every helper).

--
Address:        Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:          daniel.baumann@panthera-systems.net
Internet:       http://people.panthera-systems.net/~daniel-baumann/


Reply to: