Date: Thu, 04 Apr 2024 18:17:04 +0200 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org> To: Yasuhiro Kimura <yasu@FreeBSD.org> Cc: freebsd-ports@freebsd.org Subject: Re: `pkg autoremove` uninstalls pkg itself Message-ID: <86sf016r27.fsf@ltc.des.dev> In-Reply-To: <20240404.202624.2016737165801435957.yasu@FreeBSD.org> (Yasuhiro Kimura's message of "Thu, 04 Apr 2024 20:26:24 %2B0900 (JST)") References: <20240404.202624.2016737165801435957.yasu@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Yasuhiro Kimura <yasu@FreeBSD.org> writes: > 1. Make clean install of 14.0-RELEASE amd64. > 2. Login as root > 3. pkg install git-tiny Since you didn't already have pkg, it was bootstrapped here, and marked it as non-automatic. > 4. cd /usr/ports > 5. git clone https://git.freebsd.org/ports.git . > 6. pkg delete -afy This deleted pkg even though it was marked as non-automatic, because that's what the -f flag does, cf. pkg-delete(8). > 7. cd security/sudo (Probably any other ports are OK expect ports-mgmt/pk= g) > 8. make install This installed pkg as a build dependency of sudo, and marked it as automatic. > 9. pkg-static autoremove -y This removed pkg because it was marked as automatic and had no dependents. > Then is it expected behavior? Yes, it did exactly what you asked it to do. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86sf016r27.fsf>