From nobody Fri Dec 31 04:03:33 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 E6D29191B177 for ; Fri, 31 Dec 2021 04:05:02 +0000 (UTC) (envelope-from parv.0zero9@gmail.com) Received: from mail-vk1-xa32.google.com (mail-vk1-xa32.google.com [IPv6:2607:f8b0:4864:20::a32]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JQBPB5nZDz3mnw for ; Fri, 31 Dec 2021 04:05:02 +0000 (UTC) (envelope-from parv.0zero9@gmail.com) Received: by mail-vk1-xa32.google.com with SMTP id j4so11944774vkr.12 for ; Thu, 30 Dec 2021 20:05:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=p4goWxGm5ZA+UKAgji6Lbsb3yMtQ0GcYbOEopVEVqZQ=; b=VCvwdLTJVwjG+neef3bYw/a6rPzkZJU5cGUVwC+ZI0+b+QKv7wxtg6J2o/gvwwJUQo m9mrwEAfWN/fVJ/FrUa8RpuSfTBQaVATgfiLhd205ZWQShXIOaxCneYU63uvpbdEKnO0 eNJPWY5n4Fgl5zdJ4Yi9ZbsHZoCQvImpg3Z9EawW2xN1cAKTvF1aTAA8WuoEKc7/NPKX 9WNsKTncXvbLegsDx6Qzr3hJnJNtqW0mwj9p9prt4XIVWq1kspIQ5IbCM5aCHEpl8jyL Gwic3Isx52UklhdIa1xHYJWsa33+McYUeVYrZ4C84DvjIqJdN2STFPalYMKRf8wZ7es7 MCVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=p4goWxGm5ZA+UKAgji6Lbsb3yMtQ0GcYbOEopVEVqZQ=; b=LW2ttGnndwKvgAzEWU5qzFvQUKPKeeckHM+w1RpqDrrgu2Q/iCvB3lc6aDdcAy5EIb tAQz1sn/N6qSyiKKY83PxpOeUA0Ws7KM6bP6EveWQv/RVEJiYUJ5anoLf0rZe06m1ffs 1x6/GTNAN7h0gPEOl4cnEA88aDt0F+e5mac7Lo5up9Pe+O4X2l5PcZugua10CpUxlxri PsJJrFi+Cc4O3CmHrBxRt77eDb/o6kMhJihN25ucuBXus20Opx2DuyvFpqawAOrylKJ0 BJ3xHgTsYObRtE9z95NYryJlVD/OzT9N+nMAIMGsSI0wGjGQPccwiFuaUnQGaG+l8Mah bQ4w== X-Gm-Message-State: AOAM531rc+/iGO6CJYNtXmGxrOPypUlQhtlxs2zDwVnZ7e04LadaNmGs 4IPyWpYTivU+gIA56LMorA7vh1YIgUwiyZnDFJA= X-Google-Smtp-Source: ABdhPJwm9Bmdrpyz+tuKzgJpytimI/dXBYK9ysM3ADcMhxaBKA3XFrGkgUM4Qy8iD/U12SxVz08JqDzfK/YDqRClB5U= X-Received: by 2002:a1f:a4c5:: with SMTP id n188mr10628556vke.35.1640923496055; Thu, 30 Dec 2021 20:04:56 -0800 (PST) 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 References: <34017.1640919003@segfault.tristatelogic.com> In-Reply-To: <34017.1640919003@segfault.tristatelogic.com> From: "parv/freebsd" Date: Thu, 30 Dec 2021 18:03:33 -1000 Message-ID: Subject: Re: Package naming conventions (?) To: "Ronald F. Guilmette" Cc: freebsd-questions@freebsd.org Content-Type: multipart/alternative; boundary="00000000000016053405d4694647" X-Rspamd-Queue-Id: 4JQBPB5nZDz3mnw X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; TAGGED_FROM(0.00)[freebsd]; REPLY(-4.00)[] X-ThisMailContainsUnwantedMimeParts: N --00000000000016053405d4694647 Content-Type: text/plain; charset="UTF-8" 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 -- --00000000000016053405d4694647 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Thu, Dec 30, 2021 at 4:51 PM Ronald F. Guilmette wro= te:
I don't know if I should file a bug report on this= or not.=C2=A0 Feedback would
be appreciated.

There is a small problem with what appears to be the "standard" n= aming
convention(s) for package names.
...=C2=A0

<= div>
You mean a= *de facto*, not a written policy, on the '"standard"' co= nvention,
which is borne out to of package versions just happen to follow a pattern,=
until no= w.?

=C2=A0
In general, full package names end with a version number which consists
exclusively of digits, periods, commas, and underscores.

Some times the= re are letters too.

=C2=A0
Thus the
*generalized* (non-version-specific) package names for all currently
installed packages may, generally speaking, be derived thusly:

=C2=A0 =C2=A0 pkg info | awk '{print $1}' | sed -E 's/-([0-9]|,= |_|\.)+$//'

You could combine all the choices in a si= ngle character class: /-[0-9,_.]+$/.

=C2=A0
(I am not aware of any easier way to generate such a list of the base names=
of all currently installed packages.=C2=A0 If I have just missed how to do = that
more easily, please let me know.)

Check out "raw" out= put via '--raw' option of pkg-info(8); note the "name"
field. Ther= e may be some incantation for pkg-query(8) to obtain the information
<= div style=3D"font-family:monospace" class=3D"gmail_default">more directly.<= br>


...
So, what say you all?=C2=A0 Is this a bug or a fe= ature?
...=C2=A0

Neither a bug, nor a feature; yo= u might have assumed too much.


- parv

--

--00000000000016053405d4694647--