commit:     45ec1802c236d755e8438b92b25f5d6e5705e1d3
Author:     Marco Sirabella <marco <AT> sirabella <DOT> org>
AuthorDate: Sun Mar 21 08:41:38 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Fri Mar 26 17:51:59 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=45ec1802

eclass/common-lisp-3: Fix asd suffix substitution

Filenames containing the string "asd" such as `iolib.asdf.asd`
are improperly modified by the bash substitution (/) -> `iolibf.asd`
Replacing it with suffix remove (%) fixes this: `iolib.asdf

Closes: https://github.com/gentoo/gentoo/pull/20025
Signed-off-by: Marco Sirabella <marco <AT> sirabella.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 eclass/common-lisp-3.eclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/eclass/common-lisp-3.eclass b/eclass/common-lisp-3.eclass
index 5d5b68e6f10..334444e1632 100644
--- a/eclass/common-lisp-3.eclass
+++ b/eclass/common-lisp-3.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: common-lisp-3.eclass
@@ -136,7 +136,7 @@ common-lisp-install-one-asdf() {
        [[ $# != 1 ]] && die "${FUNCNAME[0]} must receive exactly one argument"
 
        # the suffix «.asd» is optional
-       local source=${1/.asd}.asd
+       local source=${1%.asd}.asd
        common-lisp-install-one-source true "${source}" "$(dirname "${source}")"
        local target="${CLSOURCEROOT%/}/${CLPACKAGE}/${source}"
        dosym "${target}" "${CLSYSTEMROOT%/}/$(basename ${target})"

Reply via email to