Skip to content

Commit

Permalink
cmdlib: fold commit_ostree_layer into commit_overlay
Browse files Browse the repository at this point in the history
It's the only caller now, so let's just fold it in so that future code
isn't tempted to use it.

(cherry picked from commit 2ec70d8)
  • Loading branch information
jlebon authored and dustymabe committed Nov 7, 2022
1 parent e5d3d2c commit 02ccfc6
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/cmdlib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,6 @@ prepare_build() {
export overrides_active_stamp
}

commit_ostree_layer() {
local rootfs=$1; shift
local branch=$1; shift
ostree commit --repo="${tmprepo}" --tree=dir="${rootfs}" -b "${branch}" \
--owner-uid 0 --owner-gid 0 --no-xattrs --no-bindings --parent=none \
--mode-ro-executables --timestamp "${git_timestamp}" "$@"
}

commit_overlay() {
local name path respath
name=$1
Expand All @@ -303,7 +295,10 @@ commit_overlay() {
# files, but we do.
touch "${TMPDIR}/overlay/statoverride"
echo -n "Committing ${name}: ${path} ... "
commit_ostree_layer "${TMPDIR}/overlay" "overlay/${name}" \
ostree commit --repo="${tmprepo}" \
--tree=dir="${TMPDIR}/overlay" -b "overlay/${name}" \
--owner-uid 0 --owner-gid 0 --no-xattrs --no-bindings --parent=none \
--mode-ro-executables --timestamp "${git_timestamp}" \
--statoverride <(sed -e '/^#/d' "${TMPDIR}/overlay/statoverride") \
--skip-list <(echo /statoverride)
}
Expand Down

0 comments on commit 02ccfc6

Please sign in to comment.