Skip to content

Commit

Permalink
core: Don't add composefs metadata client side
Browse files Browse the repository at this point in the history
This effectively reverts coreos@c115600

I was wrong, if we don't have fsverity today on the repo (a
common case) then this entails a full read of all files. For more information
see ostreedev/ostree#3326

Signed-off-by: Colin Walters <walters@verbum.org>
  • Loading branch information
cgwalters committed Nov 4, 2024
1 parent 6d2548d commit e667284
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 0 additions & 3 deletions src/libpriv/rpmostree-core.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -4802,9 +4802,6 @@ rpmostree_context_commit (RpmOstreeContext *self, const char *parent,
if (!ostree_commit_metadata_for_bootable (root, metadata_dict, cancellable, error))
return FALSE;
}
if (!ostree_repo_commit_add_composefs_metadata (self->ostreerepo, 0, metadata_dict,
(OstreeRepoFile *)root, cancellable, error))
return glnx_prefix_error (error, "Adding composefs metadata");

{
g_autoptr (GVariant) metadata = g_variant_dict_end (metadata_dict);
Expand Down
7 changes: 4 additions & 3 deletions tests/kolainst/destructive/layering-local
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,10 @@ fi
ostree show --print-metadata-key=ostree.bootable ${booted_commit} >out.txt
assert_file_has_content_literal out.txt 'true'
echo "ok bootable metadata"
ostree show --print-metadata-key=ostree.composefs.digest.v0 ${booted_commit} >out.txt
assert_file_has_content_literal out.txt 'byte'
echo "ok composefs metadata on client generated commit"
if ostree show --print-metadata-key=ostree.composefs.digest.v0 ${booted_commit} 2>err.txt; then
fatal "found ostree.composefs.digest.v0"
fi
echo "ok no composefs metadata on client generated commit"

# check we could uninstall the package using either its NEVRA or name
rpm-ostree uninstall foo-1.2-3.x86_64
Expand Down

0 comments on commit e667284

Please sign in to comment.