Date: Fri, 8 Apr 2016 16:23:26 +0100 From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-ports@freebsd.org Subject: Re: Deriving base port/package names Message-ID: <5707CCEE.6040301@FreeBSD.org> In-Reply-To: <20160408144957.26ad363f@gumby.homeunix.com> References: <51300.1460083670@server1.tristatelogic.com> <5707b24b.9143620a.1a679.ffffbb00SMTPIN_ADDED_MISSING@mx.google.com> <20160408144957.26ad363f@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OVqtnp17DAkFm6aRWPwJa22gxRKhqoUlV Content-Type: multipart/mixed; boundary="3CPN9pgLSXfuWILN3ugqxVr1pnCkwNoHb" From: Matthew Seaman <matthew@FreeBSD.org> To: freebsd-ports@freebsd.org Message-ID: <5707CCEE.6040301@FreeBSD.org> Subject: Re: Deriving base port/package names References: <51300.1460083670@server1.tristatelogic.com> <5707b24b.9143620a.1a679.ffffbb00SMTPIN_ADDED_MISSING@mx.google.com> <20160408144957.26ad363f@gumby.homeunix.com> In-Reply-To: <20160408144957.26ad363f@gumby.homeunix.com> --3CPN9pgLSXfuWILN3ugqxVr1pnCkwNoHb Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable On 2016/04/08 15:47, Roger Marquis wrote: > As in: `pkg rquery -a %n | grep -- '-[0-9]' | fmt` >=20 > efax-0.9a font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi= > font-adobe-utopia-75dpi font-bh-100dpi font-bh-75dpi > font-bh-lucidatypewriter-100dpi font-bh-lucidatypewriter-75dpi > font-bitstream-100dpi font-bitstream-75dpi gl-117 gnome-2048 > ja-edict-utf-8 ja-kon2-14dot ja-kon2-16dot ja-rubygem-mail-iso-2022-j= p > krb5-112 krb5-113 krb5-114 liblqr-1 libutf-8 > linux-enemyterritory-jaymod-217 linux-enemyterritory-omni-bot-0660 > nvidia-driver-304 nvidia-driver-340 onscripter-1byte p5-Acme-6502 > p5-Business-OnlinePayment-2CheckOut p5-Chemistry-3DBuilder p5-WWW-2ch= > p5-WWW-Shorten-0rz ppmd-7z qt5-3d quake2-3zb2 stf-6rd-kmod vte3-290 > xhtml-11 xorg-fonts-100dpi xorg-fonts-75dpi >=20 > Some of us see this as a weakness in the standard. That plus the lack > of documentation where you'd expect to find it violates the principles > of least surprise and KIS. The 'version' part of a full package name can't contain the '-' character. Put another way, if you're working with full pkgnames '%n-%v' it's always the last '-' character that separates the name from the version. In shell, you can do something like this: $ pkgname=3D'postgresql92-client-9.2.16' $ echo ${pkgname%-*} postgresql92-client $ echo ${pkgname##*-} 9.2.16 or if you prefer sed(1): $ echo $pkgname | sed -e 's,-[^-]*$,,' postgresql92-client $ echo $pkgname | sed -e 's,^.*-,,' 9.2.16 It's generally assumed that you'ld know if you've got a version part appended to the name or not, and would be able to code accordingly. I think a proposal to rename large chunks of the ports tree to eliminate hyphens and digits would certainly not receive a warm welcome. Cheers, Matthew --3CPN9pgLSXfuWILN3ugqxVr1pnCkwNoHb-- --OVqtnp17DAkFm6aRWPwJa22gxRKhqoUlV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQJ8BAEBCgBmBQJXB8z1XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnccgP/R0lV3Kof1AdD0zqzaFYj8Kl c4zrtYcOFJ/Ym/wnlaUjFEcYJDUCYpvLQu6HtCwelr37F1sNy/mGzHVoA+/KdnfI 6sEwJzZBkkAFIljRhyoIDOAdkFoYX0TclLXHoFvSRywXWYuzbfuxL1SG8SaTl9ka peADFcUWhkR/smSUM61X7kusOu2Cern5botbkU2c5EyNcDG2wNx7CwmEYeJ0/bpK FRyQLaWQSloHKYaT2X1YUcOoCIwapjXTl05O6Eu9aXZbAII2X/lKIJhM2p6HLbgK ETJuz2WaqUzFNcNzm0YqmOlip8n2LFJf1Vnk9ekNREMhDdApT//4O4DTS0/BHO/r WQvl3rrCMOVsrwTTXu0PWwl8xnrsI2jQIzteZyqbsI2zsSEeJI/GpnQV9wzT7Eoe ECaxxnouFQI7wcYO7OMlVRRMEXg0BHESXFinL3qjCtDFkXUn8TR9xvIn5wzL/un7 FuMTrtlYUSN39C5catyUyRykzUOmH1dmOyzBYPo4zWjKkbAtW3F4BNUNJhrPEf31 be2/AdCGZgLSupUgenUWtxXGXhWAXTZ5mKGWrZ85Awr6RH1fGeUyaOjK5AUUSVdL How106OgyH0MAeCX7qENZvyCxcWH5b2tCRcw43wH9/PYHTv4OmldZLR4Rw6ylkB/ WHo//JbPgdpRejF4D6Yl =DFYd -----END PGP SIGNATURE----- --OVqtnp17DAkFm6aRWPwJa22gxRKhqoUlV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5707CCEE.6040301>