Re: Package naming conventions (?)
- Reply: parv/freebsd: "Re: Package naming conventions (?)"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 31 Dec 2021 09:29:04 UTC
In message <CABObuOpcsG=hgLTTqm-Pw9PMWrS__5uLohY4JWwJvq9O-G1fJA@mail.gmail.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 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.? 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 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. 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'.