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
+ eqawarn "QA notice: S=WORKDIR is deprecated for cmake.eclass."
+ eqawarn "Please relocate the sources in src_unpack."
+ BUILD_DIR="${WORKDIR}"/${P}_build
+ fi
I'd suggest adding quotes to the RHS of the expression, to prevent+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
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
On Mon, 26 Jun 2023, Jaco Kroon wrote:
if [[ ${BUILD_DIR} != "${WORKDIR}"/* ]]; then
BUILD_DIR="${WORKDIR}/../build"
I know it's pathological ... but still. readlink -f should be
considered here unless it can be guaranteed that BUILD_DIR will not
contain .. components at this stage.
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.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 300 |
Nodes: | 16 (2 / 14) |
Uptime: | 90:20:32 |
Calls: | 6,697 |
Calls today: | 2 |
Files: | 12,232 |
Messages: | 5,348,490 |