commit: 50d9713fb4dd2de462f62c630b4e260bd346f16f
Author: Florian Schmaus <flow <AT> gentoo <DOT> org>
AuthorDate: Sat Jul 26 11:25:25 2025 +0000
Commit: Florian Schmaus <flow <AT> gentoo <DOT> org>
CommitDate: Sun Jul 27 12:39:41 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=50d9713f
greadme.eclass: drop "file exists" check on append
In hindsight, this check is too restrictive. The check makes it
impossible to have a completely optional README.gentoo created. For
example, a README.gentoo where all the content is conditional on USE
flags.
To address this, we drop the "file exists" check on append. The rest of
the eclass already correctly handles cases where README.gentoo might not
exist.
Signed-off-by: Florian Schmaus <flow <AT> gentoo.org>
eclass/greadme.eclass | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/eclass/greadme.eclass b/eclass/greadme.eclass
index a4335b1a6286..49aba1d89389 100644
--- a/eclass/greadme.eclass
+++ b/eclass/greadme.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2024 Gentoo Authors
+# Copyright 1999-2025 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: greadme.eclass
@@ -80,10 +80,6 @@ greadme_stdin() {
[[ $# -eq 0 ]] || die "${FUNCNAME[0]}: Bad parameters: $*"
if [[ -n ${append} ]]; then
- if [[ ! -f ${_GREADME_TMP_FILE} ]]; then
- die "Gentoo README does not exist when trying to append
to it"
- fi
-
cat >> "${_GREADME_TMP_FILE}" || die
else
cat > "${_GREADME_TMP_FILE}" || die