Hi,

Quoting Timo Röhling (2024-11-29 11:59:02)
> Just adding my two cents, I exploit the fact that .sbuildrc is essentially a
> Perl script, and do the following to have a bunch of common default options
> for mmdebstrap:

that's a good idea!

> If the default options were somehow exposed as predefined variable to the
> config script, this could be used in a similar way to append options (and it
> would be explicit, which is always nice for readability).
> 
> I'm not enough of a Perl expert to gauge how easily this could be
> implemented, though.

This is already possible today. Try this:

$unshare_mmdebstrap_extra_args = $conf->_get('UNSHARE_MMDEBSTRAP_EXTRA_ARGS');
push @{$unshare_mmdebstrap_extra_args->{"experimental"}}, 
@common_mmdebstrap_args;

The $conf->_get() function gets the configuration default without processing
percent escapes, which is what you want here. The above would first set
$unshare_mmdebstrap_extra_args to the default and then append something to an
existing entry.

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to