From 41e301791cb7354d5d5a83094d3d07326a17f0b9 Mon Sep 17 00:00:00 2001 From: Pawel Winogrodzki Date: Fri, 4 Feb 2022 13:19:38 -0800 Subject: [PATCH] [main] Preventing core build breaks when running with `USE_PREVIEW_REPO=y`. (#2094) --- toolkit/Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/toolkit/Makefile b/toolkit/Makefile index 94477454c0..e7ed771556 100644 --- a/toolkit/Makefile +++ b/toolkit/Makefile @@ -51,7 +51,7 @@ HYDRATED_BUILD ?= n toolkit_root := $(abspath $(dir $(lastword $(MAKEFILE_LIST)))) TOOLS_DIR ?= $(toolkit_root)/tools TOOL_BINS_DIR ?= $(toolkit_root)/out/tools -REPOS_DIR ?= $(toolkit_root)/repos +PREVIEW_REPO ?= $(toolkit_root)/repos/mariner-official-preview.repo RESOURCES_DIR ?= $(toolkit_root)/resources SCRIPTS_DIR ?= $(toolkit_root)/scripts @@ -104,8 +104,16 @@ SRPM_URL_LIST ?= https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR ifeq ($(USE_PREVIEW_REPO),y) PACKAGE_URL_LIST += https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/preview/base/$(build_arch) PACKAGE_URL_LIST += https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/preview/base/debuginfo/$(build_arch) - override REPO_LIST += $(REPOS_DIR)/mariner-official-preview.repo SRPM_URL_LIST += https://packages.microsoft.com/cbl-mariner/$(RELEASE_MAJOR_ID)/preview/base/srpms + ifneq ($(wildcard $(PREVIEW_REPO)),) + override REPO_LIST += $(PREVIEW_REPO) + else + $(warning ) + $(warning ######################### WARNING #########################) + $(warning 'USE_PREVIEW_REPO=y' set but '$(PREVIEW_REPO)' is missing. Regenerate toolkit's 'repos' directory. Remove 'USE_PREVIEW_REPO' for core builds.) + $(warning ######################### WARNING #########################) + $(warning ) + endif endif CA_CERT ?=