@@ -345,28 +345,8 @@ if [ -f "${changed_stamp}" ] && [ -f "${composejson}" ]; then
345345 # Save this in case the image build fails
346346 cp-reflink " ${composejson} " " ${workdir} " /tmp/compose-" ${commit} " .json
347347else
348- commit=" ${previous_commit} "
349- image_input_checksum=$( (echo " ${commit} " && echo " ${image_config_checksum} " ) | sha256sum_str)
350- echo " commit: ${commit} image: ${image_input_checksum} "
351-
352- # Grab the previous treecompose JSON (local developer case: treecompose succeeded but
353- # image build failed) if possible, otherwise grab the previous build
354- cached_previous_composejson=${workdir} /tmp/compose-${commit} .json
355- if [ -f " ${cached_previous_composejson} " ]; then
356- echo " Resuming partial build from: ${commit} "
357- cp-reflink " ${cached_previous_composejson} " " ${composejson} "
358- else
359- if [ -z " ${previous_build} " ]; then
360- # This can happen if building the bootable container worked on the first time,
361- # but image creation failed, and then tmp/ was nuked before trying a
362- # second time. Just recommend re-running with --force.
363- fatal " compose tree had no changes, but no previous build or cached data; try rerunning with --force"
364- fi
365- echo " Commit ${commit} unchanged; reusing previous build's rpm-ostree metadata"
366- # This will have all of the data from the previous build, but we'll
367- # overwrite things.
368- cp-reflink " ${previous_builddir} " /meta.json " ${composejson} "
369- fi
348+ echo " No changes in build inputs."
349+ exit 0
370350fi
371351
372352if [ -n " ${previous_build} " ]; then
388368 echo ' {}' > tmp/parent-diff.json
389369fi
390370
391- image_input_checksum=$( (echo " ${commit} " && echo " ${image_config_checksum} " ) | sha256sum_str)
392- echo " New image input checksum: ${image_input_checksum} "
393371init_build_meta_json " ${commit} " " ${PARENT_BUILD:- } " tmp/
394372buildid=$( jq -r ' .["buildid"]' < tmp/meta.json)
395373echo " New build ID: ${buildid} "
449427 runv rpm-ostree compose container-encapsulate --max-layers=" $MAX_OSTREECONTAINER_LAYERS " --format-version=1 \
450428 --repo=" ${tmprepo} " \
451429 --label=" coreos-assembler.image-config-checksum=${image_config_checksum} " \
452- --label=" coreos-assembler.image-input-checksum=${image_input_checksum} " \
453430 --label=" org.opencontainers.image.source=${gitsrc} " \
454431 --label=" org.opencontainers.image.revision=${config_gitrev} " \
455432 --copymeta-opt=fedora-coreos.stream \
@@ -479,7 +456,6 @@ cat > tmp/buildmeta.json <<EOF
479456 "summary": "${summary// \" / \\\" } ",
480457 "coreos-assembler.build-timestamp": "${build_timestamp} ",
481458 "coreos-assembler.image-config-checksum": "${image_config_checksum} ",
482- "coreos-assembler.image-input-checksum": "${image_input_checksum} ",
483459 "coreos-assembler.code-source": "${src_location} ",
484460EOF
485461
0 commit comments