Re: lang/perl5.36: update procedure written in UPDATING is not enough

From: Tatsuki Makino <tatsuki_makino_at_hotmail.com>
Date: Sun, 22 Oct 2023 23:03:43 UTC
Kevin Oberman wrote on 2023/10/22 13:12:
> I think portmaster has a bug. As per the man page, the behavior of '-f'
> matches the behavior of '-R -f".  Actually, I'm unclear on what the purpose
> '-f' is. If you run portmaster with no options on a port that is up to
> date, it still reinstalls it and has for a very long time, maybe always.

It is not so much a bug as a behavior that requires strange thinking :)
At least -f is valid for the -a option. I rarely use it :)

portmaster -a -f # This is definitely something that will fail :)
portmaster -a -f -R # After repairing something that failed, continue with the rest. No need to build rust or gcc twice :)

I have never used -f in combination with individual ports.
Or even using -f for it, but never thought much about it :)
The following is a speculative explanation of the behavior, which differs from the actual implementation...

If used without options, it is assumed to be already moved to and used in a port directory somewhere in porttree.
cd /usr/ports/ports-mgmt/pkg && portmaster

Otherwise, it tries to make with Makefile in the current directory, or make in HOME directory. They are bugs :)

Now assume two imaginary flags.
One flag is to forcefully update, and the other is to use a mechanism to allow a restart in case of failure.

When using -a, all installed ports are queued.
But they are not all forcefully updated. Only those with increased version numbers will be updated.
If -f is used there, all of them will be flagged to be forced to update and to be restartable in case of failure. -R can be used.

If individual ports are given as arguments, they will be queued and flagged which will force them to be updated.
If -f is used there, it is already determined to force update, so it only activates the feature that allows restart on failure.

So it would seem that there is such a difference :)
The above two flags change depending on the -f option and the way the port to be updated is given.

When restarting by -R, it seems to me that the ports to be queued must be exactly the same to go.
For example, if executed as follows

portmaster -f `pkg shlib -qR libperl.so.5.34`
portmaster -f -R `pkg shlib -qR libperl.so.5.34`

The number of arguments when using -R is reduced by the number of successfully updated ports.

... I estimated this as such :)
If not, first I need to see what's in portmaster more.
However, this is a tool that has existed since the last generation, so there may still be many behaviors that do not fit with pkgng.

Regards.