Re: git: cf1aba2857c1 - main - freebsd-update: refuse to operate on a pkgbase system
Date: Fri, 01 Nov 2024 00:53:50 UTC
On Oct 31, 2024, at 16:37, Ed Maste <emaste@freebsd.org> wrote:
> On Thu, 31 Oct 2024 at 15:17, Mark Millard <marklmi@yahoo.com> wrote:
>>
>>> + # Presence of FreeBSD-* package(s) indicates packaged base.
>>> + if ! pkg -c ${BASEDIR} info -q -x '^FreeBSD' 2>/dev/null; then
>>
>> Slight difference in the comment vs. the code's behavior? :
>>
>> Comment: FreeBSD-*
>> Code: FreeBSD*
>
> The code is a regex ^FreeBSD while I wrote the comment thinking of a
> shell glob - it's fine that they're not identical (except for this
> confusion).
FYI in case it is not clear:
I understood the 2 distinct notations. I was only trying to
indicate that the matching text sequences for the 2
notations used are different.
FreeBSD-* does not match: FreeBSDPkgBase
^FreeBSD does match: FreeBSDPkgBase
Do you want FreeBSDPkgBase to be a match in actual operation?
> That said there is room for improvement here - we'll want
> to detect pkgbase installs in downstream projects that use a different
> package naming scheme (e.g. packages starting with CheriBSD).
>
> I'll keep a note of this comment for any potential iteration on this.
===
Mark Millard
marklmi at yahoo.com