From 47805f23629288fe482d1ecb28198dda15312c96 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Sat, 5 Jul 2025 15:53:39 +0000 Subject: [PATCH 1/2] Add REPO_OFFLINE option --- mk/config.mk | 3 +++ mk/repo.mk | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mk/config.mk b/mk/config.mk index ceb2df0ad..1790e010d 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -18,6 +18,9 @@ CONFIG_NAME?=desktop ## Ignore errors when building the repo, attempt to build every package ## REPO_NONSTOP?=--nonstop REPO_NONSTOP?= +## Do not update source repos, attempt to build in offline condition +## REPO_OFFLINE?=--offline +REPO_OFFLINE?= ## Select filesystem config ifeq ($(BOARD),) FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml diff --git a/mk/repo.mk b/mk/repo.mk index 0f069240c..c89e02ae5 100644 --- a/mk/repo.mk +++ b/mk/repo.mk @@ -8,7 +8,7 @@ else PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) -c $(FILESYSTEM_CONFIG))" && \ export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ cd cookbook && \ - ./fetch.sh "$${PACKAGES}" + ./fetch.sh $(REPO_NONSTOP) $(REPO_OFFLINE) "$${PACKAGES}" mkdir -p $(BUILD) touch $@ endif @@ -21,7 +21,7 @@ else export COOKBOOK_HOST_SYSROOT="$(ROOT)/$(PREFIX_INSTALL)" && \ PACKAGES="$$($(LIST_PACKAGES) $(LIST_PACKAGES_OPTS) -c $(FILESYSTEM_CONFIG))" && \ cd cookbook && \ - ./repo.sh $(REPO_NONSTOP) "$${PACKAGES}" + ./repo.sh $(REPO_NONSTOP) $(REPO_OFFLINE) "$${PACKAGES}" mkdir -p $(BUILD) # make sure fstools.tag and fetch.tag are newer than the things repo modifies touch $(FSTOOLS_TAG) From cb619120a47d1320f1121a30f76a963814109c04 Mon Sep 17 00:00:00 2001 From: Wildan Mubarok Date: Sat, 5 Jul 2025 16:21:58 +0000 Subject: [PATCH 2/2] Make repo config configurable with integer --- mk/config.mk | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/mk/config.mk b/mk/config.mk index 1790e010d..7c0cc320a 100644 --- a/mk/config.mk +++ b/mk/config.mk @@ -16,11 +16,9 @@ REPO_BINARY?=0 ## Name of the configuration to include in the image name e.g. desktop or server CONFIG_NAME?=desktop ## Ignore errors when building the repo, attempt to build every package -## REPO_NONSTOP?=--nonstop -REPO_NONSTOP?= +REPO_NONSTOP?=0 ## Do not update source repos, attempt to build in offline condition -## REPO_OFFLINE?=--offline -REPO_OFFLINE?= +REPO_OFFLINE?=0 ## Select filesystem config ifeq ($(BOARD),) FILESYSTEM_CONFIG?=config/$(ARCH)/$(CONFIG_NAME).toml @@ -59,6 +57,17 @@ ifeq (,$(shell command -v sccache)) endif endif +ifeq ($(REPO_NONSTOP),1) + REPO_NONSTOP=--nonstop +else ifeq ($(REPO_NONSTOP),0) + REPO_NONSTOP= +endif +ifeq ($(REPO_OFFLINE),1) + REPO_OFFLINE=--offline +else ifeq ($(REPO_OFFLINE),0) + REPO_OFFLINE= +endif + UNAME := $(shell uname) ifeq ($(UNAME),Darwin) FUMOUNT=umount