Date: Fri, 31 Dec 2021 01:29:04 -0800 From: "Ronald F. Guilmette" <rfg@tristatelogic.com> To: freebsd-questions@freebsd.org Subject: Re: Package naming conventions (?) Message-ID: <37428.1640942944@segfault.tristatelogic.com> In-Reply-To: <CABObuOpcsG=hgLTTqm-Pw9PMWrS__5uLohY4JWwJvq9O-G1fJA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <CABObuOpcsG=3DhgLTTqm-Pw9PMWrS__5uLohY4JWwJvq9O-G1fJA@mail.gma= il.com> "parv/freebsd" <parv.0zero9+freebsd@gmail.com> wrote: >> I don't know if I should file a bug report on this or not. Feedback wo= uld >> 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"' conventi= on, >which is borne out to of package versions just happen to follow a pattern= , >until now.? Yes. It is apparently a convention. Not clearly in any sense a "standard= ". >> 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. It would appear so, unfortunately. >> 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,_.]+$/. Yes. Silly me. My bad. I was in a hurry. >> (I am not aware of any easier way to generate such a list of the base n= ames >> of all currently installed packages. If I have just missed how to do t= hat >> 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. Ummm... Invalid option. # pkg info --raw Usage: pkg info <pkg-name> pkg info -a pkg info [-AbBDdefIklOqRrs] [-Cgix] <pkg-name> pkg info [-AbBDdfIlqRrs] -F <pkg-file> For more information see 'pkg help info'.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37428.1640942944>