Oooooh. OK I apologise then. I misunderstood how synth dealt with that situation. If it just deletes it from the repo if an updated version appears in the ports tree and it's no longer installed any longer then that works for me.
Pedantically, that's not quite correct.
The criterion is not if it's installed in the system or not. The only thing that matters if if the package passes it's validity checks prior to rebuilding the repository.
For example, let's say editors/joe was updated in the ports tree.
If you "prepare-system", it will be rebuilt and the new package will pass validity checks, everything works as you indicated above.
but let's think about an alternative scenario.
Rather than using the
synth prepare-system
command, you first issue
synth install editors/nano
command. The
install command rebuilds the repository as one of its steps, and during that rebuild, the old joe package will be seen as invalid and removed. The repository will be rebuilt without any joe package. It's even more dramatic when a library is removed and then everything that depends on that library gets removed as well.
This dynamic can surprise users and I'm not quite sure what to do about it.
One approach is to change the
install command to NOT rebuild the repository, but just issue
pkg add <path/to/repo>/<package name>
. However, that might confuse pkg(8) because the installed s/w would be at a higher version than the repository digests/catalogs. Another approach might be to skip the WHOLE DIRECTORY validation step for the
install command's repo rebuilding, and only do it for explicit
synth rebuild-repository
,
synth prepare-system
, and
synth upgrade-system
commands. The last suggestion might be the best all-around modification.