Date: Sun, 21 Apr 2024 22:30:26 +0900 (JST) From: Yasuhiro Kimura <yasu@FreeBSD.org> To: freebsd-ports@freebsd.org Subject: Re: `pkg autoremove` uninstalls pkg itself Message-ID: <20240421.223026.1542858955517379564.yasu@FreeBSD.org> In-Reply-To: <20240419.214307.1212149214636268607.yasu@FreeBSD.org> References: <20240404.202624.2016737165801435957.yasu@FreeBSD.org> <CAJ_iqtbm%2BU4v1BPiZYNQJt3BTLVtX4GJRzsgu4cd7xu31hExBA@mail.gmail.com> <20240419.214307.1212149214636268607.yasu@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
From: Yasuhiro Kimura <yasu@FreeBSD.org> Subject: Re: `pkg autoremove` uninstalls pkg itself Date: Fri, 19 Apr 2024 21:43:07 +0900 (JST) > My question is, then, why what didn't happen before has happend? > > A. Something (ports-mgmt/pkg or ports framework) has changed > resently so `pkg` is marked as automatically installed when it is > installed with such situation as above. > B. There ins't such change and `pkg` has been marked automaticall > installed when it is installed with such situation. But > `pkg autoremove` didn't remove itself simply because there is > manually installed package that depends on `pkg` (either directly > or indirectly). > > IIRC, last time when I executed `pkg autoremove` is at least a year > before. So if there is someone who experienced same result under > similar situation before a year or more, then the answer is B. And it > means everything have worked as is expected. But if there isn't, then > the answer is probably A and it may be worth investgating the reason > of the change. Just from curiosity I checked out following commit and tested if the issue also happens (I selected the commit just because it was committed on the release date of 14.0-RELEASE). ---------------------------------------------------------------------- commit 5f5f3d7a8808 Author: Piotr Kubaj <pkubaj@FreeBSD.org> AuthorDate: Mon Nov 20 15:29:31 2023 +0100 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: Mon Nov 20 15:32:05 2023 +0100 shells/oksh: update to 7.4 ---------------------------------------------------------------------- Then output of `pkg query '%a' pkg` is '0' and `pkg autoremove` doesn't remove itself. It means something is changed after this commit and it is the cause of the issue. I tried bisect, and according to the result of it the issue starts with following commit. ---------------------------------------------------------------------- commit 830ec3717024 Author: Tijl Coosemans <tijl@FreeBSD.org> AuthorDate: Wed Mar 6 20:13:39 2024 +0100 Commit: Tijl Coosemans <tijl@FreeBSD.org> CommitDate: Wed Mar 6 21:22:21 2024 +0100 Mk/Scripts/do-depends.sh: Avoid make -D flag Both FreeBSD make and GNU make pass command line flags to sub-makes through the MAKEFLAGS environment variable, but the flags aren't compatible and GNU make 4.4 exits with an error when it encounters flags it doesn't understand, e.g. -D. Avoid using the flag for now until ports run gmake with SETENVI. This fixes the case where a port is built using make directly and it recurses to build a dependency that uses gmake. Poudriere does not use this feature of the ports tree to build dependencies so it's not affected. PR: 272216, 277492 ---------------------------------------------------------------------- As far as I read commit message, the issue of pkg seems to be unintended result of this commit. --- Yasuhiro Kimura
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20240421.223026.1542858955517379564.yasu>