From nobody Tue May 06 10:26:26 2025 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ZsF1Q54kNz5vq41 for ; Tue, 06 May 2025 10:26:34 +0000 (UTC) (envelope-from SRS0=y2Sc=XW=klop.ws=ronald-lists@realworks.nl) Received: from smtp-relay-int-backup.realworks.nl (smtp-relay-int-backup.realworks.nl [87.255.56.188]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4ZsF1Q3CBbz3XBX; Tue, 06 May 2025 10:26:34 +0000 (UTC) (envelope-from SRS0=y2Sc=XW=klop.ws=ronald-lists@realworks.nl) Authentication-Results: mx1.freebsd.org; none Received: from smtp-relay-int-backup.realworks.nl (crmpreview3.colo2.realworks.nl [10.2.52.33]) by mailrelayint1.colo2.realworks.nl (Postfix) with ESMTP id 4ZsF1G5cd5z1FQ; Tue, 6 May 2025 12:26:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=klop.ws; s=rw2; t=1746527186; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=E+qfAtuQFeF1b79vkEPBwCtKT20+SSnG6NFfBPw+4+o=; b=RBJ9AVbgYzfSUYzs09cHokbkyy8xSpIBQC5Q5iVzUXfgCjiUWwII+OpFWV+11xFKQxKezh kchAj+Wyq0TLHal8V0xfBRSkjxZ0M9gxh6VbInr/0XLmgt2X94BoNZO52qFXoHFuxAChAk KXfL4t5Bz+Es4Kw/BD4Jp/WGtGqmhJh1yHI7d85XIbK2vspDtAW4xqdjgWrC9KR3sx1YtR D5g4XVET1eJ5XTDoyZJzyZUbX7L+QBQ3D4sPOP2gDsRnCqyt6d6SlCWa1NuEJfScaJync/ 2uNY2pYfcCjndTyW0MOaP6Ud4ptYbOIiYa6b37yyVMMqoung4ZTlyD8NsXsXrg== Received: from crmpreview3.colo2.realworks.nl (localhost [127.0.0.1]) by crmpreview3.colo2.realworks.nl (Postfix) with ESMTP id B9D761400AA; Tue, 6 May 2025 12:26:26 +0200 (CEST) Date: Tue, 6 May 2025 12:26:26 +0200 (CEST) From: Ronald Klop To: Matthew Seaman Cc: freebsd-current@freebsd.org Message-ID: <561432496.5693.1746527186471@localhost> In-Reply-To: <051b6c25-152a-4f4e-bcbb-c3efa5181acf@FreeBSD.org> References: <26F78444-4489-444A-87E3-63E24F21F091@gushi.org> <051b6c25-152a-4f4e-bcbb-c3efa5181acf@FreeBSD.org> Subject: Re: Recent changes to pkg argument parsing (https://reviews.freebsd.org/D49977) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5692_197694020.1746527186117" X-Mailer: Realworks (748.20) X-Originating-Host: from (83-81-212-149.cable.dynamic.v4.ziggo.nl [83.81.212.149]) by crmpreview3.colo2.realworks.nl [10.2.52.33] with HTTP; Tue, 06 May 2025 12:26:26 +0200 Importance: Normal X-Priority: 3 (Normal) X-Originating-User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:138.0) Gecko/20100101 Firefox/138.0 X-Rspamd-Queue-Id: 4ZsF1Q3CBbz3XBX X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:38930, ipnet:87.255.32.0/19, country:NL] X-Spamd-Bar: ---- ------=_Part_5692_197694020.1746527186117 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Van: Matthew Seaman Datum: dinsdag, 6 mei 2025 11:04 Aan: freebsd-current@freebsd.org Onderwerp: Re: Recent changes to pkg argument parsing (https://reviews.freebsd.org/D49977) > > On 06/05/2025 09:18, Dan Mahoney (Ports) wrote: > > For example, we've got a cron job on every box that gathers all our leaf packages into a file: > > > > #!/bin/sh > > /usr/sbin/pkg query -e '%#r == 0' '%n-%v' > > > > We now get warnings: > > > > # /usr/local/libexec/pkgleaf > > pkg: invalid option -- e > > > > (but the query still runs). > > > > Has anyone else seen this? > > This is pkg(7) struggling to parse options that it doesn't do anything with other than pass them through to the real pkg(8). > > As said elsewhere in the thread, a fix for the problem has been committed to base. Until that makes its way through the system into a release, you can work around the problem by changing your command to: > > /usr/local/sbin/pkg query -e '%#r == 0' '%n-%v' > > ie. call pkg(8) directly rather than via pkg(7). > > Cheers, > > Matthew > > > > > The bug has never been in any release. It was only in 15-CURRENT since April 30th. Regards, Ronald. ------=_Part_5692_197694020.1746527186117 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit

Van: Matthew Seaman <matthew@FreeBSD.org>
Datum: dinsdag, 6 mei 2025 11:04
Aan: freebsd-current@freebsd.org
Onderwerp: Re: Recent changes to pkg argument parsing (https://reviews.freebsd.org/D49977)

On 06/05/2025 09:18, Dan Mahoney (Ports) wrote:
> For example, we've got a cron job on every box that gathers all our leaf packages into a file:
>
> #!/bin/sh
> /usr/sbin/pkg query -e '%#r == 0' '%n-%v'
>
> We now get warnings:
>
> # /usr/local/libexec/pkgleaf
> pkg: invalid option -- e
>
> (but the query still runs).
>
> Has anyone else seen this?

This is pkg(7) struggling to parse options that it doesn't do anything with other than pass them through to the real pkg(8).

As said elsewhere in the thread, a fix for the problem has been committed to base.  Until that makes its way through the system into a release, you can work around the problem by changing your command to:

/usr/local/sbin/pkg query -e '%#r == 0' '%n-%v'

ie. call pkg(8) directly rather than via pkg(7).

    Cheers,

    Matthew
 

 


The bug has never been in any release. It was only in 15-CURRENT since April 30th.

Regards,
Ronald.

  ------=_Part_5692_197694020.1746527186117--