[Vmdebootstrap-devel] Bug#770722: [Bug#770722]: add --debootstrap-opts to pass additional options to debootstrap

Jan Gerber j at mailb.org
Sun May 3 18:36:32 UTC 2015


On 05/03/2015 07:58 PM, Neil Williams wrote:
>> I stand by my opinion, however, that adding another level of option
>> parsing would be confusing. vmdebootstrap's already difficult to use
>> (and I say that as its original author).
>
> Mandating that the value to the option is entirely quoted?
>
> --debootstrap-option "--components=main,contrib"
>
> It would be an error to provide more than one string to the option.

that would only help if the shell would split at the comma,
but this is done in cliapp.settings.StringListSetting:

http://git.liw.fi/cgi-bin/cgit/cgit.cgi/cliapp/tree/cliapp/settings.py#n113

Looking at the documentation of string_list/StringListSetting it is not 
clear to me why it has the additional comma parsing, it seams to combine 
2 modes:
  - argument can be passed multiple times to pass multiple values
    (--key foo --key bar)
  - value is a list separated by comma
    (--key "foo, bar")

my initial thought would be that settings.string_list should be one of 
those two modes not both. from the docs I would guess the first mode.

adding a simple string list without comma parsing could look like this:

class MultiStringSetting(StringSetting):
     action = 'append'
     using_default_value = False

Lars, would that be acceptable to add to cliapp?



More information about the Vmdebootstrap-devel mailing list