Hi Morten,

Am Fri, Feb 21, 2025 at 07:05:43PM +0100 schrieb Morten Kjeldgaard:
> Dear Maintainer,
> 
> When running mini-dinstall version 0.7.3, the program writes out a couple of 
> messages saying:
> 
>   'chown_changes_files' is deprecated, please use 'restrict_changes_files' 
> instead
> 
> This is a actually message for the developer, since there is nothing the user 
> can do to prevent it from appearing.
> 
> I looked in the code for mini-dinstall, but I am not able to understand 
> what's going on. The deprecated dict entry 'chown_changes_files' is defined 
> in line 404 of mini-dinstall. The deprecated message comes from line 457, 
> that says:
> 
>   if distributions[dist]['chown_changes_files'] is not None:
>      ...
> 
> However that variable never gets the value None. It has the value False, and 
> so the execution proceeds inside the if clause.
> 
> A bit further down we have the code:
> 
>   if distributions[dist]['restrict_changes_files'] is None:
>      distributions[dist]['restrict_changes_files'] =  
> distributions[dist]['chown_changes_files']
> 
> where apparently the newer option restrict_changes_files is set equal to the 
> older one if it is defined. Only this code is also not executed since the 
> value of distributions[dist]['chown_changes_files'] is False and not None.
> 
> I don't understand what the code is doing. If it comes from a set user 
> option, the error should tell the user to change it in the config file, but 
> if the user should not be alerted if the user has not set any 
> chown_changes_files option.

with mini-dinstall version 0.7.0, unit193 renamed the config option
chown_changes_files to restrict_changes_files. The reason for this is
Bug 821960 (see [1]). He put some information in the NEWS file, with
will be displayed (and mailed) when upgrade to version 0.7.0 via apt. So
it's not a bug and the user should update its configuration.

> I discovered another bug in the code, a forgotten .getName() -> .name change, 
> I have submitted a Pull Request on salsa for that one.

Thanks for this! I'll push it later today or tomorrow into our salsa git
repository.

Cheers,
Christoph

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=821960

Reply via email to