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 403FB1581D3 for ; Sun, 2 Jun 2024 13:57:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6398CE2B27; Sun, 2 Jun 2024 13:57:24 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 14D17E2B1D for ; Sun, 2 Jun 2024 13:57:24 +0000 (UTC) From: Florian Schmaus To: gentoo-dev@lists.gentoo.org Cc: pacho@gentoo.org, Florian Schmaus Subject: [gentoo-dev] [PATCH 0/4] Improve readme.gentoo-r1.eclass Date: Sun, 2 Jun 2024 15:57:05 +0200 Message-ID: <20240602135716.66992-1-flow@gentoo.org> X-Mailer: git-send-email 2.44.1 In-Reply-To: <20240109083914.242561-1-flow@gentoo.org> References: <20240109083914.242561-1-flow@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-Transfer-Encoding: 8bit X-Archives-Salt: c8068b0e-9a8a-4a2e-b060-6e2c8048ab77 X-Archives-Hash: ce16afbcccb95fd84357a59bbb4a87a3 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