From 50d9713fb4dd2de462f62c630b4e260bd346f16f Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 26 Jul 2025 13:25:25 +0200 Subject: [PATCH] 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 --- eclass/greadme.eclass | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/eclass/greadme.eclass b/eclass/greadme.eclass index a4335b1a62868..49aba1d89389d 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