public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: Sam James <sam@gentoo.org>
Cc: gentoo-dev@lists.gentoo.org,  base-system@gentoo.org,  kde@gentoo.org
Subject: Re: [gentoo-dev] [PATCH] cmake.eclass: workaround S=${WORKDIR} creating builddir above ${WORKDIR}
Date: Mon, 26 Jun 2023 12:36:07 +0200	[thread overview]
Message-ID: <u1qhypl2g@gentoo.org> (raw)
In-Reply-To: <20230626095716.1292297-1-sam@gentoo.org> (Sam James's message of "Mon, 26 Jun 2023 10:57:15 +0100")

>>>>> On Mon, 26 Jun 2023, Sam James wrote:

> +
> +		# Avoid creating ${WORKDIR}_build (which is above WORKDIR).
> +		# TODO: For EAPI > 8, we should ban S=WORKDIR for CMake.
> +		# See bug #889420.
> +		if [[ ${S} == ${WORKDIR} && ${BUILD_DIR} == ${WORKDIR}_build ]] ; then

I'd suggest adding quotes to the RHS of the expression, to prevent
globbing.

But I think what you really want is to check whether ${BUILD_DIR}
(whatever its name is) is a subdirectory of ${WORKDIR}? Maybe a test
like this would make that intent clearer:

    if [[ ${BUILD_DIR} != "${WORKDIR}"/* ]]; then

> +			eqawarn "QA notice: S=WORKDIR is deprecated for cmake.eclass."
> +			eqawarn "Please relocate the sources in src_unpack."
> +			BUILD_DIR="${WORKDIR}"/${P}_build
> +		fi


  reply	other threads:[~2023-06-26 10:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-26  9:57 [gentoo-dev] [PATCH] cmake.eclass: workaround S=${WORKDIR} creating builddir above ${WORKDIR} Sam James
2023-06-26 10:36 ` Ulrich Mueller [this message]
2023-06-26 10:45   ` Jaco Kroon
2023-06-26 11:14     ` Ulrich Mueller
2023-06-26 15:24   ` Sam James

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=u1qhypl2g@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=base-system@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    --cc=kde@gentoo.org \
    --cc=sam@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox