From c25405d6134c44646b92fe8404de776199f855d3 Mon Sep 17 00:00:00 2001 From: Chris Kay Date: Mon, 10 Mar 2025 09:24:34 +0000 Subject: [PATCH] build(poetry): install dependencies with `--no-root` More recent versions of Poetry introduced the `package-mode` key to configure whether the project should be used for dependency management only, but this is incompatible with the earlier versions of Poetry that we still support. Instead, we rely on installing with the `--no-root` flag, which behaves similarly. Installing without passing the `--no-root` flag is deprecated, and in recent versions of Poetry has become a hard error. This change ensures that the build system always installs dependencies with the required flag. Change-Id: Ic1543511314dcd20c00b73fd9e8cfae3dd034a41 Signed-off-by: Chris Kay --- Makefile | 4 ++-- docs/Makefile | 4 ++-- plat/arm/common/arm_common.mk | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 4368279a2..1aa2224c8 100644 --- a/Makefile +++ b/Makefile @@ -1777,12 +1777,12 @@ $(BUILD_PLAT)/romlib/romlib.bin $(BUILD_PLAT)/lib/libwrappers.a $&: $(BUILD_PLAT $(q)${MAKE} PLAT_DIR=${PLAT_DIR} BUILD_PLAT=${BUILD_PLAT} ENABLE_BTI=${ENABLE_BTI} CRYPTO_SUPPORT=${CRYPTO_SUPPORT} ARM_ARCH_MINOR=${ARM_ARCH_MINOR} INCLUDES=$(call escape-shell,$(INCLUDES)) DEFINES=$(call escape-shell,$(DEFINES)) --no-print-directory -C ${ROMLIBPATH} all memmap: all - $(if $(host-poetry),$(q)poetry -q install) + $(if $(host-poetry),$(q)poetry -q install --no-root) $(q)$(if $(host-poetry),poetry run )memory -sr ${BUILD_PLAT} tl: ${BUILD_PLAT}/tl.bin ${BUILD_PLAT}/tl.bin: ${HW_CONFIG} - $(if $(host-poetry),$(q)poetry -q install) + $(if $(host-poetry),$(q)poetry -q install --no-root) $(q)$(if $(host-poetry),poetry run )tlc create --fdt $< -s ${FW_HANDOFF_SIZE} $@ doc: diff --git a/docs/Makefile b/docs/Makefile index 68c095812..288cc9701 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -1,5 +1,5 @@ # -# Copyright (c) 2019-2024, Arm Limited. All rights reserved. +# Copyright (c) 2019-2025, Arm Limited. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -24,5 +24,5 @@ help: # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). .DEFAULT: Makefile - $(if $(host-poetry),$(q)poetry -q install --with=docs) + $(if $(host-poetry),$(q)poetry -q install --no-root --with=docs) $(q)$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/plat/arm/common/arm_common.mk b/plat/arm/common/arm_common.mk index 6d59bae63..c8f6b4132 100644 --- a/plat/arm/common/arm_common.mk +++ b/plat/arm/common/arm_common.mk @@ -1,5 +1,5 @@ # -# Copyright (c) 2015-2024, Arm Limited and Contributors. All rights reserved. +# Copyright (c) 2015-2025, Arm Limited and Contributors. All rights reserved. # # SPDX-License-Identifier: BSD-3-Clause # @@ -502,7 +502,7 @@ ifneq ($(COTDTPATH),) $(q)$($(ARCH)-cpp) $(cot-dt-cpp-flags) $(BUILD_PLAT)/$(COTDTPATH:.dtsi=.c): $(BUILD_PLAT)/$(COTDTPATH:.dtsi=.dts) | $$(@D)/ - $(if $(host-poetry),$(q)poetry -q install) + $(if $(host-poetry),$(q)poetry -q install --no-root) $(q)$(if $(host-poetry),poetry run )cot-dt2c convert-to-c $< $@ BL2_SOURCES += $(BUILD_PLAT)/$(COTDTPATH:.dtsi=.c)