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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 879B1158004 for ; Tue, 4 Jun 2024 18:59:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE3DFE2BB9; Tue, 4 Jun 2024 18:59:10 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9764DE2BB4 for ; Tue, 4 Jun 2024 18:59:10 +0000 (UTC) Date: Tue, 4 Jun 2024 14:59:06 -0400 From: Ionen Wolkens To: gentoo-dev@lists.gentoo.org, Florian Schmaus Subject: Re: [gentoo-dev] [PATCH 1/4] readme.gentoo-r1.eclass: display readme if content changed (or fresh install) Message-ID: Mail-Followup-To: gentoo-dev@lists.gentoo.org, Florian Schmaus References: <20240602135716.66992-1-flow@gentoo.org> <20240602135716.66992-2-flow@gentoo.org> <90350087-100f-4ca1-a9a5-b714d82b2d9a@gentoo.org> 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 X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="FpH7WaGGfLtJUGtT" Content-Disposition: inline In-Reply-To: X-Archives-Salt: a5d85990-9d3e-4a31-8819-74cedeb10b0b X-Archives-Hash: d772acda8da3c73747bc2e2be05e222e --FpH7WaGGfLtJUGtT Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jun 04, 2024 at 02:37:56PM -0400, Ionen Wolkens wrote: > On Tue, Jun 04, 2024 at 07:45:39PM +0200, Ulrich Mueller wrote: > > In any case, the above size considerations aren't important. My main > > point is that the code is getting way too complicated for the simple > > task of printing a few lines in pkg_postinst. >=20 > Have to say that this is mostly how I feel as well. Not that I followed > this whole conversation in full. >=20 > That aside, with all this talk of using the installed README.gentoo, > note that the file may not even be there because of FEATURES=3D"nodoc". > Albeit could just assume it's unchanged in these cases. >=20 > Don't know if idea came up in this thread before but, if *really* had > to implement a mechanic to display the README.gentoo again on changes, > think I'd personally add an optional version variable/argument that > could be bumped by the ebuild maintainer whenever the README is > changed. Then if the version it's replacing is older than that it'll > display it again with a notice explaining that it changed. There are > some limitations to this approach but well, e.g. > - won't work without a bump/revbump to compare with > - maintainer might forget to set the version after changes > - version won't mean as much if update the README in all ebuild > versions at once, and can't tell what's actually been seen > (might cause occasional see-it-again when stabilizing) > - can't display a diff if wanted one, not that the hash approach > could do that either Forgot to say, one perk is that maintainer can choose when the readme is worth showing again. Hash would display it for minor style or typo fixes. Also in case what I was talking about is unclear, I'm talking about ver_test using ${REPLACING_VERSIONS} like we often do in pkg_postinst to show information only once on a bump. e.g. pkg-1.0.0: initial readme (no version) pkg-1.0.1: modified readme, set readme's version to 1.0.1 in ebuild pkg-1.0.2: readme is the same, keep readme's 1.0.1 unchanged first install (any version) =3D display 1.0.0 -> 1.0.1 bump =3D display again 1.0.1 -> 1.0.2 bump =3D won't display --=20 ionen --FpH7WaGGfLtJUGtT Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCAAdFiEEx3SLh1HBoPy/yLVYskQGsLCsQzQFAmZfY/oACgkQskQGsLCs QzQ3UQf/cDKwmwUEDtk44vfzFViof3mHkO9XLnoAFUfZcjNdaPf9UzsnJIlzR+su m4oIfU8GLDx4RrVrmRlZpgLPsQtG0mrmTnEuWq8qMsayqr30K1600hihNsW1XLTl IhCQdh2NhubN27F+ypUhjVjFZtfJ6lbOkAM4m0xVgbcd3DBV4Iq2ljEKlJZWRDj6 iXmxe48IFJkMw1EcJz5zxMnXMSdTRRWjBHDVaGg5YUPhcZgc0D+HWLNxkbD+5cMI AZDnIvDvaasvscx/7PtZ284t8tKq7+qdGTyynLQSXRV1QmOeimwnvuB35hE38ipi G/miBCuwrEN1u0pjs0Z7mObcQIX1bg== =DpfX -----END PGP SIGNATURE----- --FpH7WaGGfLtJUGtT--