From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 782F41396D0 for ; Sat, 9 Sep 2017 17:06:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id A232DE0DCA; Sat, 9 Sep 2017 17:06:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4F4B7E0C56 for ; Sat, 9 Sep 2017 17:06:07 +0000 (UTC) Received: from katipo2.lan (unknown [203.86.205.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: kentnl) by smtp.gentoo.org (Postfix) with ESMTPSA id 28E823416AB for ; Sat, 9 Sep 2017 17:06:05 +0000 (UTC) Date: Sun, 10 Sep 2017 05:05:20 +1200 From: Kent Fredric To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [PATCH] eapi7-ver.eclass: 'Early adopter' version of EAPI 7 version manip Message-ID: <20170910050520.27b7089b@katipo2.lan> In-Reply-To: <1504972492.29031.0.camel@gentoo.org> References: <20170908111923.8809-1-mgorny@gentoo.org> <20170910030556.666c392b@katipo2.lan> <1504972492.29031.0.camel@gentoo.org> Organization: Gentoo X-Mailer: Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/ILdt+xTXifE4=ATqPWg_rdX"; protocol="application/pgp-signature" X-Archives-Salt: 6b08df6f-3da6-48fa-9767-3dba4a705783 X-Archives-Hash: 251c74c3b784ba68fbb589b0454b74b0 --Sig_/ILdt+xTXifE4=ATqPWg_rdX Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, 09 Sep 2017 17:54:52 +0200 Micha=C5=82 G=C3=B3rny wrote: > I'm not sure if there's a serious proposal behind all this but I suppose > it's all just perl-specific insanity that is of no value to everyone > else. Yeah, some of the stuff I suggested there are generalisations, because it doesn't make sense to suggest such a feature and have it be *excusively* for Perl usage. Pretty much 100% of our usage would be just the 3-position + truncate form. So: $(ver_fixlen $(ver_3float ${PV}) 3) Or something would be most of it. We'd probably just keep doing what we're doing with hard-normalization + hard-version-maps, mostly because its more obvious what is going on. But we do have people who keep wanting something that maps $PV to upstream, and the existing tools to do that aren't /quite/ ideal. NB: Above, the simplified tools are: ver_fixlen $version $length =20 - ensure everything after first '.' are numbers=20 - make sure there are at most $length characters after '.' - if characters over $length limit are not '0', error. - truncate extraneous 0's beyond $length limit - if the remaining number of digits after the '.' is less than $length, 0-= pad ver_3float $version - assume every group after the first '.' are the range 0-999 - expand every group to 3 digits , so 0 =3D=3D 000, 1 =3D=3D 001, 10 =3D= =3D 010, etc. - concatenate all minor groups=20 - emit ${first}.${minor_groups} I think those two would be all perl people might have a use for. ( Again, wouldn't be something we'd deploy at volume in perl-module.eclass, would only be for the people who wanted to simplify their own custom maintenance outside the perl herd ) I really only suggested these sorts of things because I figured "its going to be in an EAPI? maybe the implementation might be in python?, doing this sort of thing in python might actually be viable, whereas its a terrible nightmare to do this kind of string manipulation in bash" Though I figure its possible to in bash, I'm just not insane enough to try (yet, getting there) --Sig_/ILdt+xTXifE4=ATqPWg_rdX Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEPZazbI/qrFT1o9rn6FQySxNmqCAFAlm0H2wACgkQ6FQySxNm qCCnExAAgpLATuSctW05cjqge7JfHxTzmyaJUptHEBTtdy9uHISd5M1fhpc5+smm 6XVmrgxfMYCJ00QTYE9QL3yw8Wsx7248RbCrG2v9lJZ3YSpGg3cIjNcN1HuBlxRq RRso+2oCL6w87+gFn1k1PTjaWaf/O3+zF4AekQFNRQs9WFBRyJn2y3D5+8L7zbo7 PWE4Hx2W0g+YHrRfaJJ65ZnzvDFKhasnGQjjssF7p8y/3CWoW5ygkwBM8EZjohew s3jzIoBA0f19KvmkB18JSMaCvcpT0uesZQ/eYC0qN/pb8iOYwo7GZxEB8kwj/v8O 8ZTKCkAs4ez7NL5+LXWIPuQ3Qx8SMOUSm4Yv9LzNVzxH0QMxl/bOdd7fOJTP6qYM s6ovVnwKnVciAW8uS5isLLpR/L0KdSVA8B4Gy7BlkSg2qOfnU6rLMsIj3n79LrZR gz5yAiZtqgExVKM2jHYqJjHbSyzV0k1ruCCWYah9Jgao4ZqvUlNJRRzqQ2AY6a94 9IrUW/G1QgHqr6QucadG4ee3K7v3QWVUQPwF8TQYIl83Kyr44uXPPiMFGHhgJF8N F11/eSH4920bZcJXHIyEDeuUDYdaCTBiDSQSQV7M/sxkS+g0+KjyAApbHVAKLvC3 YaLzD4PpbpVkNZ3VHQsd+k3zZrGeiTXa9OpdVKYB7+cEpjTvqlc= =i8/E -----END PGP SIGNATURE----- --Sig_/ILdt+xTXifE4=ATqPWg_rdX--