commit: 160b1d4031074c5d4d49c42c9a07056c9b4b8617 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Dec 17 00:36:47 2021 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Dec 17 00:37:45 2021 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=160b1d40
dune.eclass: fix default value of DUNE_PKG_NAME We need to use :=, not :-, because we want to reassign DUNE_PKG_NAME, not just return the new value. Closes: https://bugs.gentoo.org/829199 Closes: https://bugs.gentoo.org/829299 Closes: https://bugs.gentoo.org/829327 Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/dune.eclass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/eclass/dune.eclass b/eclass/dune.eclass index 69aad36921b9..4653db3ae791 100644 --- a/eclass/dune.eclass +++ b/eclass/dune.eclass @@ -19,7 +19,7 @@ # @DESCRIPTION: # Sets the actual Dune package name, if different from Gentoo package name. # Set before inheriting the eclass. -: ${DUNE_PKG_NAME:-${PN}} +: ${DUNE_PKG_NAME:=${PN}} case ${EAPI:-0} in 6|7|8) ;; @@ -66,6 +66,7 @@ dune_src_test() { # @CODE dune-install() { local -a pkgs=( "${@}" ) + [[ ${#pkgs[@]} -eq 0 ]] && pkgs=( "${DUNE_PKG_NAME}" ) local -a myduneopts=( @@ -73,6 +74,7 @@ dune-install() { --libdir="${D%/}$(ocamlc -where)" --mandir="${ED%/}/usr/share/man" ) + local pkg for pkg in "${pkgs[@]}" ; do ebegin "Installing ${pkg}"
