From nobody Fri Dec 31 02:50:03 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 DB62D19346CD for ; Fri, 31 Dec 2021 02:50:04 +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 4JQ8kg5hm9z3M4Y for ; Fri, 31 Dec 2021 02:50:03 +0000 (UTC) (envelope-from rfg@tristatelogic.com) Received: by segfault.tristatelogic.com (Postfix, from userid 1237) id 5DD784E6C2; Thu, 30 Dec 2021 18:50:03 -0800 (PST) From: "Ronald F. Guilmette" To: freebsd-questions@freebsd.org Subject: Package naming conventions (?) 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: <34016.1640919003.1@segfault.tristatelogic.com> Content-Transfer-Encoding: quoted-printable Date: Thu, 30 Dec 2021 18:50:03 -0800 Message-ID: <34017.1640919003@segfault.tristatelogic.com> X-Rspamd-Queue-Id: 4JQ8kg5hm9z3M4Y X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of rfg@tristatelogic.com designates 69.62.255.118 as permitted sender) smtp.mailfrom=rfg@tristatelogic.com X-Spamd-Result: default: False [-3.30 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-0.996]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[tristatelogic.com]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; MID_RHS_MATCH_FROMTLD(0.00)[]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:14051, ipnet:69.62.128.0/17, country:US]; SUBJECT_HAS_QUESTION(0.00)[] X-ThisMailContainsUnwantedMimeParts: N 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. Specifically, something less than 100% of all packages seem to follow the obvious naming convention(s), and this has caused me some minor grief. In general, full package names end with a version number which consists exclusively of digits, periods, commas, and underscores. 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]|,|_|\.)+$//' = (I am not aware of any easier way to generate such a list of the base name= s of all currently installed packages. If I have just missed how to do that more easily, please let me know.) Anyway, the above command pipeline yields a list of the base names of all installed packages with the exception of a small number of packages that do not conform to the "standard" (lexical structure) naming conventions for full package names, specifically, these ones: fstrcmp-0.7.D001 drm-kmod-g20190710_1 drm-fbsd13-kmod-5.4.144.g20211013 (This is only a list of the full packages names that I am aware of that fa= il to follow the standard naming conventions. There may be others.) Why is this an issue? Here's why... I just did a fresh install of 13.0-STABLE. After that I did: pkg install `cat my.desired.pkgs` where my.desired.pkgs is the name of a file containing the base names of a= ll of the packages that I routinely use and want installed, e.g.: firefox gimp gthumb ... etc. After allowing the "pkg install" command to run to completion (while I had dinner) I wanted to verify that, in fact, all of the packages that I had asked to have installed did in fact get installed. If it were not for the occasional goofy/non-normal full package names mentioned above, this would have been a simple matter of just doing the following: pkg info | awk '{print $1}' | sed -E 's/-([0-9]|,|_|\.)+$//' > my.inst= .pkgs comm -23 my.desired.pkgs my.inst.pkgs That would have / should have yielded a list of just those packages that I had wanted to get installed, but that for some reason did not in fact get installed. Unfortunately, due to the problem with there being less than 100% of all full package names following the "standard" lexical structure of the vast majority of all package names, the above pair of commands yielded a list of not just the packages that failed to install successfully, but also the goofy/non-normal package names mentioned above. So, what say you all? Is this a bug or a feature? Maybe I just have a fetish for adherence to obvious conventions, but this does annoy me. And it clearly doesn't have to be this way. Regards, rfg