Date: Thu, 30 Dec 2021 18:03:33 -1000 From: "parv/freebsd" <parv.0zero9+freebsd@gmail.com> To: "Ronald F. Guilmette" <rfg@tristatelogic.com> Cc: freebsd-questions@freebsd.org Subject: Re: Package naming conventions (?) Message-ID: <CABObuOpcsG=hgLTTqm-Pw9PMWrS__5uLohY4JWwJvq9O-G1fJA@mail.gmail.com> In-Reply-To: <34017.1640919003@segfault.tristatelogic.com> References: <34017.1640919003@segfault.tristatelogic.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Thu, Dec 30, 2021 at 4:51 PM Ronald F. Guilmette wrote:
> I don't know if I should file a bug report on this or not. Feedback would
> be appreciated.
>
> There is a small problem with what appears to be the "standard" naming
> convention(s) for package names.
...
You mean a *de facto*, not a written policy, on the '"standard"' convention,
which is borne out to of package versions just happen to follow a pattern,
until now.?
> In general, full package names end with a version number which consists
> exclusively of digits, periods, commas, and underscores.
Some times there are letters too.
> Thus the
> *generalized* (non-version-specific) package names for all currently
> installed packages may, generally speaking, be derived thusly:
>
> pkg info | awk '{print $1}' | sed -E 's/-([0-9]|,|_|\.)+$//'
You could combine all the choices in a single character class:
/-[0-9,_.]+$/.
> (I am not aware of any easier way to generate such a list of the base names
> of all currently installed packages. If I have just missed how to do that
> more easily, please let me know.)
Check out "raw" output via '--raw' option of pkg-info(8); note the "name"
field. There may be some incantation for pkg-query(8) to obtain the
information
more directly.
...
> So, what say you all? Is this a bug or a feature?
>
...
Neither a bug, nor a feature; you might have assumed too much.
- parv
--
[-- Attachment #2 --]
<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:monospace">On Thu, Dec 30, 2021 at 4:51 PM Ronald F. Guilmette wrote:<br></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I don't know if I should file a bug report on this or not. Feedback would<br>
be appreciated.<br>
<br>
There is a small problem with what appears to be the "standard" naming<br>
convention(s) for package names.</blockquote><div><span class="gmail_default" style="font-family:monospace">...</span> </div><div><br></div><div><div style="font-family:monospace" class="gmail_default">You mean a *de facto*, not a written policy, on the '"standard"' convention,</div><div style="font-family:monospace" class="gmail_default">which is borne out to of package versions just happen to follow a pattern,</div><div style="font-family:monospace" class="gmail_default">until now.?<br></div><br></div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
In general, full package names end with a version number which consists<br>
exclusively of digits, periods, commas, and underscores.</blockquote><div style="font-family:monospace" class="gmail_default"><br>
<div style="font-family:monospace" class="gmail_default">Some times there are letters too.</div><div style="font-family:monospace" class="gmail_default"><br></div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Thus the<br>
*generalized* (non-version-specific) package names for all currently<br>
installed packages may, generally speaking, be derived thusly:<br>
<br>
pkg info | awk '{print $1}' | sed -E 's/-([0-9]|,|_|\.)+$//'</blockquote><div><br></div><div><div style="font-family:monospace" class="gmail_default">You could combine all the choices in a single character class: /-[0-9,_.]+$/.<br></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
(I am not aware of any easier way to generate such a list of the base names<br>
of all currently installed packages. If I have just missed how to do that<br>
more easily, please let me know.<span class="gmail_default" style="font-family:monospace">)</span></blockquote><div><br></div><div><div style="font-family:monospace" class="gmail_default">Check out "raw" output via '--raw' option of pkg-info(8); note the "name"</div><div style="font-family:monospace" class="gmail_default">field. There may be some incantation for pkg-query(8) to obtain the information</div><div style="font-family:monospace" class="gmail_default">more directly.<br></div></div><div><br></div><div><br></div><div><div style="font-family:monospace" class="gmail_default">...</div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">So, what say you all? Is this a bug or a feature?<br></blockquote><div><span class="gmail_default" style="font-family:monospace">...</span> </div><div><br></div><div><div style="font-family:monospace" class="gmail_default">Neither a bug, nor a feature; you might have assumed too much.</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">- parv</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default">-- <br></div><div style="font-family:monospace" class="gmail_default"><br></div></div></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CABObuOpcsG=hgLTTqm-Pw9PMWrS__5uLohY4JWwJvq9O-G1fJA>
