Following up on the comments of the last patchset, this revision
incorporates the functionality of the initially proposed
greadme.eclass into the existing readme.gentoo-r1.eclass. While this
misses the chance to get rid of some ballast of the existing eclass,
people asked to extend the existing eclass instead of starting fresh.

As a quick reminder, those changes aim to improve the user experience
of readme.gentoo-r1.eclass by reducing the amount of messages
presented to the user upon emerge. This is achieved by only showing
the contents of README.gentoo *if they have changed* (or on fresh
installations).

The previous revision was criticized for using "docompress -x
README.gentoo", i.e., excluding README.gentoo from being
compressed. However, exclusion from compression is necessary to
reliably detect if the contents have changed.

After discussing this with others, we came up with the following
compromise that should be acceptable by everyone.

Instead of excluding the whole README.eclass from compression, we use
chksum to create the 4-byte CRC value of the file. The eclass then
uses the existing 4-byte value and compares it with the 4-byte value
in the package's image directory to determine if the contents of
README.gentoo have changed.

I would like to thank Sam for the helpful comments that led to the
resulting design.

Note that this changes readme.gentoo-r1.eclass to export phase
functions when it previously did not.
Finally, I'd like to (restate) my concern that updating the existing
eclass, instead of starting fresh with a new eclass, misses the chance
to eliminate some ballast.


Florian Schmaus (4):
  readme.gentoo-r1.eclass: display readme if content changed (or fresh
    install)
  readme.gentoo-r1.eclass: use _GREADME_TMP_FILE in existing code
  readme.gentoo-r1.eclass: add readme.gentoo_stdin()
  readme.gentoo-r1.eclass: add readme.gentoo_file()

 eclass/readme.gentoo-r1.eclass | 206 +++++++++++++++++++++++++++++----
 1 file changed, 185 insertions(+), 21 deletions(-)

-- 
2.44.1


Reply via email to