On 02/06/2024 17.34, Ulrich Mueller wrote: >>>>>> On Sun, 02 Jun 2024, Florian Schmaus wrote: > >> + ( >> + insinto "${_GREADME_DOC_DIR}" >> + >> + doins "${_GREADME_TMP_FILE}" >> + cksum --raw "${_GREADME_TMP_FILE}" | newins - "${_GREADME_HASH_FILENAME}" >> + assert >> + ) > > Why do you need that hash file? The old README file exists on the > system, so couldn't you just compare the new one with it? As Eli wrote and as I tried to make clear in the commit message (but probably failed), there is unfortunately no reliable way to decompress the two, most likely, compressed README.gentoo files in pkg_preinst. Nothing guarantees that the decompressor is available at the time pkg_preinst runs. And even if we would ignore that, and try to opportunistically decompress the files, then it is far from trivial to select the right decompressor. I've looked in unpacker.eclass, which has some magic for that, but only for the algorithms not required by PMS. Hence I am glad we came up (I think it was mostly Sam) with the hash-based approach, as it avoids having to deal with decompressing the files. - Flow