Re: [PATCH 1/2] scripts: add TOML config to container tool

Guillaume Tucker <[email protected]>
Newsgroups gmane.linux.documentation,gmane.linux.kernel.workflows,gmane.linux.kernel,gmane.linux.kbuild.devel
Message-ID <[email protected]>
On 24/08/2026 12:05 pm, Guillaume Tucker wrote:
> @@ -20,10 +22,14 @@ class ContainerRuntime(abc.ABC):
>   
>       name = None  # Property defined in each implementation class
>   
> -    def __init__(self, args, logger):
> -        self._uid = args.uid or os.getuid()
> -        self._gid = args.gid or args.uid or os.getgid()
> -        self._env_file = args.env_file
> +    def __init__(self, args, config, logger):
> +        self._uid = args.uid or config.uid or os.getuid()
> +        self._gid = (
> +            args.gid or config.gid or
> +            args.uid or config.uid or
> +            os.getgid()
> +        )

There was a bug here when uid or gid was set to 0 (root) as it would
evaluate as False and be ignored.  This is because they are now
treated as integers rather than strings.  I've fixed this in the v2.

Guillaume
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.