From e6ece70620fd347a36e46c9e6d0877aa229f30fb Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Sat, 24 Oct 2026 18:21:13 +0200 Subject: [PATCH] deduplicate local.ign along with the other ignition files default-butane-spec.sh appended "local.ign" to the merge list outside of the duplicate detection. An empty local.bu (as written by packaging scripts) compiles to the same content as an empty "-examples" ignition file, and butane rejects the duplicate entry: "make package" failed on base/build/fcos-dev.ign since the coreos split. local.ign is now passed as the last argument, so it keeps its place at the end of the merge list and is skipped when its content duplicates a previous file. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KuHAbQsFqabSuCuzQ1PrRK --- scripts/common.mk | 4 ++-- scripts/default-butane-spec.sh | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/common.mk b/scripts/common.mk index 18e1813..ef894cb 100644 --- a/scripts/common.mk +++ b/scripts/common.mk @@ -495,8 +495,8 @@ build/fcos-dev.bu: SELF := $(PROJECT_NAME) $(PROJECT_NAME)-examples # The ignition files are needed to detect duplicates (see default-butane-spec.sh). build/fcos-dev.bu: build/$(PROJECT_NAME).ign build/$(PROJECT_NAME)-examples.ign $(DEPENDENCIES_IGNITION_EXAMPLES_FILES) build/fcos-test.bu: build/$(PROJECT_NAME).ign $(DEPENDENCIES_IGNITION_FILES) -build/fcos-dev.bu build/fcos-test.bu: %.bu: Makefile $(SCRIPTS_DIR)/default-butane-spec.sh build - $(SCRIPTS_DIR)/default-butane-spec.sh $(foreach name,$(SELF) $(DEPS),$(call ignition_path,$(name))) > $@ +build/fcos-dev.bu build/fcos-test.bu: %.bu: Makefile $(SCRIPTS_DIR)/default-butane-spec.sh build $(TOP_LEVEL_DIR)/build/local.ign + $(SCRIPTS_DIR)/default-butane-spec.sh $(foreach name,$(SELF) $(DEPS),$(call ignition_path,$(name))) $(TOP_LEVEL_DIR)/build/local.ign > $@ # Path of the ignition file of the current project or of one of its dependencies (with or without the "-examples" suffix). ignition_path = $(if $(filter $(PROJECT_NAME) $(PROJECT_NAME)-examples,$(1)),build/$(1).ign,$(COOKBOOKS_DIR)/$(patsubst %-examples,%,$(1))/build/$(1).ign) diff --git a/scripts/default-butane-spec.sh b/scripts/default-butane-spec.sh index a06a261..b5cbdb0 100755 --- a/scripts/default-butane-spec.sh +++ b/scripts/default-butane-spec.sh @@ -2,12 +2,12 @@ set -Eeuo pipefail -# Usage: default-butane-spec.sh ... +# Usage: default-butane-spec.sh ... # # Butane inlines the "local" files as data URLs and rejects duplicate entries. # So, ignition files whose content is identical to a previous one (typically -# the empty "-examples" ignition files) are skipped. Merging the same config -# twice would be a no-op anyway. +# the empty "-examples" ignition files, or an empty local.ign) are skipped. +# Merging the same config twice would be a no-op anyway. cat <<'EOF' variant: fcos @@ -26,4 +26,3 @@ for ign in "$@"; do seen[$checksum]="$(basename "$ign")" echo " - local: $(basename "$ign")" done -echo " - local: local.ign"