Re: devel/glib20 packages

From: Graham Perrin <grahamperrin_at_freebsd.org>
Date: Tue, 29 Nov 2022 21:12:22 UTC
On 29/11/2022 01:57, Pat Maddox wrote:
>
> On 28 Nov 2022, at 15:59, Graham Perrin wrote:
>
>     I'm confused.
>
>     If pkg search -r FreeBSD devel/glib20 *does* find the package,
>     then why does pkg search -r FreeBSD glib20 *not* find the package?
>
>     Also, why the emptiness at
>     <https://www.freshports.org/devel/glib20/#packages>?
>
>     ----
>
>     % pkg search glib20
>     % pkg search -r FreeBSD glib20
>     % pkg search -r FreeBSD devel/glib20
>     devel/glib20                   Some useful routines of C
>     programming (current stable version)
>     % pkg info -x devel/glib20
>     glib-2.74.1,2
>     %
>
> Not sure about the emptiness.
>
> The answer to your first question is found in pkg-search(8) 
> <https://www.freebsd.org/cgi/man.cgi?pkg-search>:
>
> |-S search, --search search Specify the field to search the repository 
> catalogue on. If unspecified, searches on pkg-name unless the search 
> term con- tains a / character, when it searches on port origin. Output 
> will be sorted in order of the search field. See the "Search and Label 
> Options" sections for more details. |
>
> Looking at the glib20 Makefile 
> <https://cgit.freebsd.org/ports/tree/devel/glib20/Makefile>, you can 
> see that the port name is |glib|.
>
> So, |pkg search glib20| searches for a /package/ named |glib20|, which 
> doesn’t exist. |pkg search devel/glib20| searches for an /origin/ 
> named |devel/glib20|, which does exist.
>
> Pat
>
Ah, thanks for the reminder. The pkg-name difference threw me, whilst 
searching, more than once in the past.

I usually read the two 'pkg install' lines in FreshPorts to tell a 
difference, where one exists. 
<https://www.freshports.org/devel/glib20/#add> for example.

The emptiness was a transient issue, there's now the customary table of 
packages.