'pkg autoremove' sometimes removes the pkg package even when it isn't marked as automatic
This doesn't happen every time, but it does happen. This possibly depends on the set of packages that are removed.
pkg-1.21.3 FreeBSD 14.0 STABLE
are you able to reproduce ? is there any trace or anything about it you can provide?
I will post an update if/once I will be able to reproduce this issue again.
Yes, I can reproduce with pkg-1.21.3
I think I know what exactly happens.
Initially pkg is set to auto=false. But later pkg upgrades itself and changes it to auto=true.
Then pkg autoremove removes it.
The core problem description is: pkg should preserve the auto flag on packages that it upgrades or re-installs in the process of updating other packages.
pkg upgrades itself
To which version?
FWIW I have not found a change to the automatic flag with any upgrade to 2.⋯ (typically 2.0.6).