Hi,

Quoting Johannes Schauer Marin Rodrigues (2024-12-03 01:03:57)
> > 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?

both is now implemented here:

https://salsa.debian.org/debian/sbuild/-/merge_requests/104

I have yet to find a problem for which globs are not powerful enough and
regular expressions are required but since globs work by turning them into
regexes, support for regular expressions comes for free and thus they are
supported as well for now...

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature

Reply via email to