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. > > Have to say that this is mostly how I feel as well. Not that I followed > this whole conversation in full. > > That aside, with all this talk of using the installed README.gentoo, > note that the file may not even be there because of FEATURES="nodoc". > Albeit could just assume it's unchanged in these cases. > > 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) = display 1.0.0 -> 1.0.1 bump = display again 1.0.1 -> 1.0.2 bump = won't display -- ionen