cmdlib: embed overlay/ convention into `commit_overlay`
That way, it's not something callers have to remember to do.
@@ -301,7 +301,7 @@ commit_overlay() {
# files, but we do.
touch "${TMPDIR}/overlay/statoverride"
echo -n "Committing ${name}: ${path} ... "
- commit_ostree_layer "${TMPDIR}/overlay" "${name}" \
+ commit_ostree_layer "${TMPDIR}/overlay" "overlay/${name}" \
--statoverride <(sed -e '/^#/d' "${TMPDIR}/overlay/statoverride") \
--skip-list <(echo /statoverride)
}
@@ -397,10 +397,7 @@ EOF
if ! [ -d "${n}" ]; then
continue
fi
- local bn ovlname
- bn=$(basename "${n}")
- ovlname="overlay/${bn}"
- commit_overlay "${ovlname}" "${n}"
+ commit_overlay "$(basename "${n}")" "${n}"
done
fi
@@ -411,7 +408,7 @@ EOF
export ostree_image_json="/usr/share/coreos-assembler/image.json"
mkdir -p "${imagejsondir}/usr/share/coreos-assembler/"
cp "${image_json}" "${imagejsondir}${ostree_image_json}"
- commit_overlay overlay/cosa-image-json "${imagejsondir}"
+ commit_overlay cosa-image-json "${imagejsondir}"
layers="${layers} overlay/cosa-image-json"
local_overrides_lockfile="${tmp_overridesdir}/local-overrides.json"
@@ -457,7 +454,7 @@ EOF
chmod 0644 "${tmp_overridesdir}/contentsetrootfs/usr/share/buildinfo/content_manifest.json"
echo -n "Committing ${tmp_overridesdir}/contentsetrootfs... "
- commit_overlay overlay/contentset "${tmp_overridesdir}/contentsetrootfs"
+ commit_overlay contentset "${tmp_overridesdir}/contentsetrootfs"
layers="${layers} overlay/contentset"
fi
@@ -471,7 +468,7 @@ EOF
rootfs_overrides="${overridesdir}/rootfs"
if [[ -d "${rootfs_overrides}" && -n $(ls -A "${rootfs_overrides}") ]]; then
touch "${overrides_active_stamp}"
- commit_overlay "overlay/cosa-overrides-rootfs" "${rootfs_overrides}"
+ commit_overlay cosa-overrides-rootfs "${rootfs_overrides}"
cat >> "${override_manifest}" << EOF
ostree-override-layers:
- overlay/cosa-overrides-rootfs
