@@ -345,28 +345,8 @@ if [ -f "${changed_stamp}" ] && [ -f "${composejson}" ]; then
345
345
# Save this in case the image build fails
346
346
cp-reflink " ${composejson} " " ${workdir} " /tmp/compose-" ${commit} " .json
347
347
else
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
370
350
fi
371
351
372
352
if [ -n " ${previous_build} " ]; then
388
368
echo ' {}' > tmp/parent-diff.json
389
369
fi
390
370
391
- image_input_checksum=$( (echo " ${commit} " && echo " ${image_config_checksum} " ) | sha256sum_str)
392
- echo " New image input checksum: ${image_input_checksum} "
393
371
init_build_meta_json " ${commit} " " ${PARENT_BUILD:- } " tmp/
394
372
buildid=$( jq -r ' .["buildid"]' < tmp/meta.json)
395
373
echo " New build ID: ${buildid} "
449
427
runv rpm-ostree compose container-encapsulate --max-layers=" $MAX_OSTREECONTAINER_LAYERS " --format-version=1 \
450
428
--repo=" ${tmprepo} " \
451
429
--label=" coreos-assembler.image-config-checksum=${image_config_checksum} " \
452
- --label=" coreos-assembler.image-input-checksum=${image_input_checksum} " \
453
430
--label=" org.opencontainers.image.source=${gitsrc} " \
454
431
--label=" org.opencontainers.image.revision=${config_gitrev} " \
455
432
--copymeta-opt=fedora-coreos.stream \
@@ -479,7 +456,6 @@ cat > tmp/buildmeta.json <<EOF
479
456
"summary": "${summary// \" / \\\" } ",
480
457
"coreos-assembler.build-timestamp": "${build_timestamp} ",
481
458
"coreos-assembler.image-config-checksum": "${image_config_checksum} ",
482
- "coreos-assembler.image-input-checksum": "${image_input_checksum} ",
483
459
"coreos-assembler.code-source": "${src_location} ",
484
460
EOF
485
461
0 commit comments