Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 6 May 2025 12:26:26 +0200 (CEST)
From:      Ronald Klop <ronald-lists@klop.ws>
To:        Matthew Seaman <matthew@FreeBSD.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: Recent changes to pkg argument parsing (https://reviews.freebsd.org/D49977)
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>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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.

 
[-- Attachment #2 --]
<html><head></head><body><br>
<p><strong>Van:</strong> Matthew Seaman &lt;matthew@FreeBSD.org&gt;<br>
<strong>Datum:</strong> dinsdag, 6 mei 2025 11:04<br>
<strong>Aan:</strong> freebsd-current@freebsd.org<br>
<strong>Onderwerp:</strong> Re: Recent changes to pkg argument parsing (https://reviews.freebsd.org/D49977)</p>;

<blockquote style="padding-right: 0px; padding-left: 5px; margin-left: 5px; border-left: #000000 2px solid; margin-right: 0px">
<div class="MessageRFC822Viewer" id="P">
<div class="MultipartMixedViewer">
<div class="MultipartMixedViewer">
<div class="TextPlainViewer" id="P.P.P1.P1">On 06/05/2025 09:18, Dan Mahoney (Ports) wrote:<br>
&gt; For example, we've got a cron job on every box that gathers all our leaf packages into a file:<br>
&gt;<br>
&gt; #!/bin/sh<br>
&gt; /usr/sbin/pkg query -e '%#r == 0' '%n-%v'<br>
&gt;<br>
&gt; We now get warnings:<br>
&gt;<br>
&gt; # /usr/local/libexec/pkgleaf<br>
&gt; pkg: invalid option -- e<br>
&gt;<br>
&gt; (but the query still runs).<br>
&gt;<br>
&gt; Has anyone else seen this?<br>
<br>
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).<br>
<br>
As said elsewhere in the thread, a fix for the problem has been committed to base. &nbsp;Until that makes its way through the system into a release, you can work around the problem by changing your command to:<br>
<br>
/usr/local/sbin/pkg query -e '%#r == 0' '%n-%v'<br>
<br>
ie. call pkg(8) directly rather than via pkg(7).<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Cheers,<br>
<br>
&nbsp;&nbsp;&nbsp;&nbsp;Matthew<br>
&nbsp;</div>

<hr></div>

<div class="DefaultViewer">&nbsp;</div>
</div>
</div>
</blockquote>
<br>
<br>
The bug has never been in any release. It was only in 15-CURRENT since April 30th.<br>
<br>
Regards,<br>
Ronald.<br>
<br>
&nbsp;</body></html>
home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?561432496.5693.1746527186471>