Signed-off-by: Ulrich Müller <
ulm@gentoo.org>
---
eclass/cvs.eclass | 120 ++++++++++++++++++++--------------------------
1 file changed, 52 insertions(+), 68 deletions(-)
diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass
index dbacc2c09cfe..ec0ad2ec8f71 100644
--- a/eclass/cvs.eclass
+++ b/eclass/cvs.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# @ECLASS: cvs.eclass
@@ -268,13 +268,14 @@ cvs_fetch() {
# In case ECVS_TOP_DIR is a symlink to a dir, get the real path,
# otherwise addwrite() doesn't work.
- cd -P "${ECVS_TOP_DIR}" >/dev/null
+ cd -P "${ECVS_TOP_DIR}" >/dev/null || die
ECVS_TOP_DIR=$(pwd)
# Disable the sandbox for this dir
addwrite "${ECVS_TOP_DIR}"
# Determine the CVS command mode (checkout or update)
+ local mode
if [[ ! -d ${ECVS_TOP_DIR}/${ECVS_LOCALNAME}/CVS ]] ; then
mode=checkout
else
@@ -294,14 +295,14 @@ cvs_fetch() {
# Switch servers automagically if