Skip to content

Commit

Permalink
Provide an option not to auto-clean toolchain during daily-build (#11279
Browse files Browse the repository at this point in the history
)
  • Loading branch information
0xba1a authored Dec 18, 2024
1 parent c36b428 commit e78ca42
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions toolkit/docs/building/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -589,6 +589,14 @@ also augment the URL list.

> Use the daily build sources for the given date. `lkg` will use the last known good build.
##### `DAILY_BUILD_SKIP_TOOLCHAIN_AUTO_CLEANUP=`**`n`** *(default)*

> Delete the already downloaded toolchain RPMs and freshly download from LKG repo
##### `DAILY_BUILD_SKIP_TOOLCHAIN_AUTO_CLEANUP=`**`y`**

> Don't delete the already download tolchain RPMs to save time. Use only if are sure about this behaviour.
#### `DISABLE_UPSTREAM_REPOS=...`

##### `DISABLE_UPSTREAM_REPOS=`**`n`** *(default)*
Expand Down
2 changes: 2 additions & 0 deletions toolkit/scripts/daily_build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ DAILY_BUILD_ID ?=
DAILY_BUILD_ID_UPDATE_MANIFESTS ?= y
##help:var:DAILY_BUILD_REPO={path to daily.repo}=Path to the daily build repo file to use.
DAILY_BUILD_REPO ?=
##help:var:DAILY_BUILD_SKIP_TOOLCHAIN_AUTO_CLEANUP={y,n}=Skip Deleting all downloaded toolchain RPMs when using a daily build.
DAILY_BUILD_SKIP_TOOLCHAIN_AUTO_CLEANUP ?= n

daily_lkg_workdir = $(BUILD_DIR)/daily_build_id

Expand Down
2 changes: 2 additions & 0 deletions toolkit/scripts/toolchain.mk
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,10 @@ clean-toolchain-rpms:
# We leave the directory structure in place since docker based builds using re-usable chroots will have mounted the
# toolchain subdirectories into the chroots. Removing the directories would break the mounts.
$(STATUS_FLAGS_DIR)/toolchain_auto_cleanup.flag: $(STATUS_FLAGS_DIR)/daily_build_id.flag $(depend_VALIDATE_TOOLCHAIN_GPG)
ifeq ($(SKIP_TOOLCHAIN_AUTO_CLEANUP),n)
@echo "Daily build ID or validation mode changed, sanitizing toolchain"
find $(TOOLCHAIN_RPMS_DIR) -type f -name '*.rpm' -exec rm -f {} +
endif
touch $@
copy-toolchain-rpms:
Expand Down

0 comments on commit e78ca42

Please sign in to comment.