Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Nov 2022 17:57:25 -0800
From:      "Pat Maddox" <pat@patmaddox.com>
To:        "Graham Perrin" <grahamperrin@freebsd.org>
Cc:        freebsd-pkg@freebsd.org
Subject:   Re: devel/glib20 packages
Message-ID:  <66F0142C-1E2B-4601-9F70-C943EF485C84@patmaddox.com>
In-Reply-To: <096a4130-1a48-f7f3-80b4-de8d3969498a@freebsd.org>

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

[-- Attachment #1 --]
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
[-- Attachment #2 --]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">On 28 Nov 2022, at 15:59, Graham Perrin wrote:</p>

</div>
<div style="white-space:normal"></div>
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px"><div id="39E87330-2611-4CC2-89D9-D1A480A383FE">
  
    <p>I'm confused. <br>
    </p>
    <p>If <span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">pkg search -r
          FreeBSD devel/glib20</span></span> <b>does</b> find the
      package, then why does <span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">pkg search -r
          FreeBSD glib20</span></span> <b>not</b> find the package? <br>
    </p>
    <p>Also, why the emptiness at
      <a class="moz-txt-link-rfc2396E" href="https://www.freshports.org/devel/glib20/#packages">&lt;https://www.freshports.org/devel/glib20/#packages&gt;</a>? <br>
    </p>
    <p>----<br>
    </p>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">% pkg search
          glib20
        </span><br>
        % pkg search -r FreeBSD glib20
        <br>
        % pkg search -r FreeBSD devel/glib20
        <br>
        devel/glib20                   Some useful routines of C
        programming (current stable version)
        <br>
        % pkg info -x devel/glib20
        <br>
        glib-2.74.1,2
        <br>
        % <br>
        <br>
      </span></p>
  
  <lt-container></lt-container></div></blockquote>
<div style="white-space:normal">
<blockquote style="border-left:2px solid #777; color:#777; margin:0 0 5px; padding-left:5px">
</blockquote></div>
<div style="white-space:normal">

<p dir="auto">Not sure about the emptiness.</p>

<p dir="auto">The answer to your first question is found in <a href="https://www.freebsd.org/cgi/man.cgi?pkg-search" style="color:#3983C4">pkg-search(8)</a>:</p>

<pre style="background-color:#F7F7F7; border-radius:5px 5px 5px 5px; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#F7F7F7"><code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0" bgcolor="#F7F7F7">-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.
</code></pre>

<p dir="auto">Looking at the <a href="https://cgit.freebsd.org/ports/tree/devel/glib20/Makefile" style="color:#3983C4">glib20 Makefile</a>, you can see that the port name is <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">glib</code>.</p>

<p dir="auto">So, <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">pkg search glib20</code> searches for a <em>package</em> named <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">glib20</code>, which doesn’t exist. <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">pkg search devel/glib20</code> searches for an <em>origin</em> named <code style="background-color:#F7F7F7; border-radius:3px; margin:0; padding:0 0.4em" bgcolor="#F7F7F7">devel/glib20</code>, which does exist.</p>

<p dir="auto">Pat</p>
</div>
</div>
</body>
</html>
help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?66F0142C-1E2B-4601-9F70-C943EF485C84>