From nobody Fri Dec 31 09:29:04 2021 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A02521935029 for ; Fri, 31 Dec 2021 09:29:05 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: from outgoing.tristatelogic.com (segfault.tristatelogic.com [69.62.255.118]) by mx1.freebsd.org (Postfix) with ESMTP id 4JQKb53VFlz3Gfm for ; Fri, 31 Dec 2021 09:29:05 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: by segfault.tristatelogic.com (Postfix, from userid 1237) id 8E56B4E6C2; Fri, 31 Dec 2021 01:29:04 -0800 (PST) From: "Ronald F. Guilmette" To: freebsd-questions@freebsd.org Subject: Re: Package naming conventions (?) In-Reply-To: List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <37427.1640942944.1@segfault.tristatelogic.com> Content-Transfer-Encoding: quoted-printable Date: Fri, 31 Dec 2021 01:29:04 -0800 Message-ID: <37428.1640942944@segfault.tristatelogic.com> X-Rspamd-Queue-Id: 4JQKb53VFlz3Gfm X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N In message "parv/freebsd" 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 info -a pkg info [-AbBDdefIklOqRrs] [-Cgix] pkg info [-AbBDdfIlqRrs] -F For more information see 'pkg help info'.