From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3BC09158009 for ; Mon, 26 Jun 2023 10:36:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 78D72E0896; Mon, 26 Jun 2023 10:36:13 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 366AEE0886 for ; Mon, 26 Jun 2023 10:36:13 +0000 (UTC) From: Ulrich Mueller To: Sam James 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} In-Reply-To: <20230626095716.1292297-1-sam@gentoo.org> (Sam James's message of "Mon, 26 Jun 2023 10:57:15 +0100") References: <20230626095716.1292297-1-sam@gentoo.org> Date: Mon, 26 Jun 2023 12:36:07 +0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Type: text/plain X-Archives-Salt: 32dcdea7-c271-48a9-bdbd-53687c4e7117 X-Archives-Hash: 65f849396a759465cd073764b8f9be61 >>>>> 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