`pkg autoremove` uninstalls pkg itself

From: Yasuhiro Kimura <yasu_at_FreeBSD.org>
Date: Thu, 04 Apr 2024 11:26:24 UTC
Hello,

I tried following steps.

1. Make clean install of 14.0-RELEASE amd64.
2. Login as root
3. pkg install git-tiny
4. cd /usr/ports
5. git clone https://git.freebsd.org/ports.git .
6. pkg delete -afy
7. cd security/sudo (Probably any other ports are OK expect ports-mgmt/pkg)
8. make install
9. pkg-static autoremove -y

Then step 9 uninstalls pkg package itself. And it is a bit surprising
for me.

Then is it expected behavior?

Regards.

---
Yasuhiro Kimura