Hello Johannes,

On Fri, 29 Nov 2024 at 09:17, Johannes Schauer Marin Rodrigues 
<jo...@debian.org> wrote:
>
> Hi Samuel,
>
> Quoting Samuel Henrique (2024-11-29 01:53:56)
> > The option UNSHARE_MMDEBSTRAP_EXTRA_ARGS behaves a bit differently than one
> > would expect for an "extra_args" type of option.
>
> do you have an example of other software which uses something similar to
> "extra_args" in the way you expect?

Nothing comes to mind specifically, I thought this expectation would be a
consensus, but if you're asking me, it means that's not the case, and thus I
would understand keeping it the way it is.

Just to clarify what I mean, I only "extra_args" type of variables to
append-only if they are exposed as configurations or flags to the user, if they
are used internally, for eg..: a specific Makefile flag, then I would not
expect that to be empty.

> > The manpage mentions there is a default value for this, which means that if 
> > an
> > user wants to, for example, make sure apt-cacher-ng is always used, the user
> > needs to copy the current default + apt-cacher-ng changes to their confs.
> >
> > It becomes harder to maintain, as the user needs to periodically check if 
> > the
> > default changed and update it in their confs.
> >
> > I would like for a solution which lets users set extra flags without 
> > overriding
> > the defaults.
>
> This feature is marked as experimental for a reason. We can definitely change
> this. I wonder what the best interface would be?
>
> Is what you want a "append to defaults" option?

Yes.

> The problem with an "append to default" option is, that now you need
> another option to change the default. And you also still need to periodically
> check what the current default is because your appending to the default
> will change depending on what the default actually is.

Yes, I mean, that would be rare, right? It's a similar type of issue as
breaking other types of user settings.If we have to overwrite, I need to keep
an eye on the changes to make sure I don't miss new features, if I append, I
only need to worry about breakages (less likely to happen).

> Do you have a proposal in mind?

I didn't have one, but I like Timo's idea of exposing the default as a
variable, that way the default behavior is still to override the value of
"unshare_mmdebstrap_extra_args", but lets the user perform an append by using a
variable that contains the defaults.

This way the user doesn't have to keep an eye on changes (at least not as
frequently), and we allow users to replace the default without complex changes
to sbuild.

What do you think? Does sbuild have a precedence for exposing variables like
that for sbuildrc?

Cheers,

-- 
Samuel Henrique <samueloph>

Reply via email to