Hi, Quoting Samuel Henrique (2024-12-01 10:15:28) > > But that being said: I'm not quite happy with this interface yet. I was > > pondering with extending the extra arguments to allow regex replacements > > similar to what is allowed in $unshare_mmdebstrap_distro_mangle and then > > somebody could do: > > > > '(.*)-backports' => [ '.... deb http://deb.debian.org/debian $1 main' ... ] > > > > The problem with that is, that this would mean that $1 in the value would > > have a special meaning which would be surprising if you do not mean to have > > $1 treated as a replacement reference... > > > > Of course there is always the option to hard-code codenames but I do not > > like > > the idea to carry a long list of codenames in the config. Being able to > > match > > on prefixes like '-backports' would be much better. > > > > What do you think? > > I believe the current state fits all Debian use cases, so I wouldn't bother > with regex support, unless you know of scenarios where the current state > becomes a limitation.
you gave an example below. > With the MR, we now enable sbuild to automatically create chroots for > $codename-release, but this could be improved further. Would it be possible > to have sbuild use the regular stable chroot and enable the following > arguments whenever %r contains "-backports"? --build-dep-resolver=aptitude > --extra-repository="deb http://deb.debian.org/debian bookworm-backports main" If you want special handling for distributions ending in a given string, you at least need support for globs. For more complicated rules, you need regex matching. Globs are probably sufficient for most cases. You could then: $unshare_mmdebstrap_extra_args = { "*-backports" => [ ... ], "*-security" => [ ... ], } But I wonder if regexes would not be better. That would mirror what is possible with $unshare_mmdebstrap_distro_mangle and then you could write: $unshare_mmdebstrap_extra_args = { qr/^(experimental|rc-buggy|UNRELEASED)$/ => [ ... ], qr/^(.*)-backports$/ => [ ... ], } What do you think? Thanks! cheers, josch
signature.asc
Description: signature