From owner-freebsd-ports@freebsd.org Fri Apr 8 15:23:18 2016 Return-Path: Delivered-To: freebsd-ports@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CD5F4B0887E for ; Fri, 8 Apr 2016 15:23:18 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from smtp.infracaninophile.co.uk (smtp.infracaninophile.co.uk [IPv6:2001:8b0:151:1:c4ea:bd49:619b:6cb3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59247174C for ; Fri, 8 Apr 2016 15:23:18 +0000 (UTC) (envelope-from matthew@FreeBSD.org) Received: from zero-gravitas.local (unknown [85.199.232.226]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: m.seaman@infracaninophile.co.uk) by smtp.infracaninophile.co.uk (Postfix) with ESMTPSA id 7789D110D9 for ; Fri, 8 Apr 2016 15:23:13 +0000 (UTC) Authentication-Results: smtp.infracaninophile.co.uk; dmarc=none header.from=FreeBSD.org Authentication-Results: smtp.infracaninophile.co.uk/7789D110D9; dkim=none; dkim-atps=neutral Subject: Re: Deriving base port/package names To: freebsd-ports@freebsd.org References: <51300.1460083670@server1.tristatelogic.com> <5707b24b.9143620a.1a679.ffffbb00SMTPIN_ADDED_MISSING@mx.google.com> <20160408144957.26ad363f@gumby.homeunix.com> From: Matthew Seaman Message-ID: <5707CCEE.6040301@FreeBSD.org> Date: Fri, 8 Apr 2016 16:23:26 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160408144957.26ad363f@gumby.homeunix.com> Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="OVqtnp17DAkFm6aRWPwJa22gxRKhqoUlV" X-Virus-Scanned: clamav-milter 0.99.1 at smtp.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,RDNS_NONE, SPF_SOFTFAIL autolearn=no autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on smtp.infracaninophile.co.uk X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2016 15:23:18 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --OVqtnp17DAkFm6aRWPwJa22gxRKhqoUlV Content-Type: multipart/mixed; boundary="3CPN9pgLSXfuWILN3ugqxVr1pnCkwNoHb" From: Matthew Seaman 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--