diff options
author | Colin Walters <walters@verbum.org> | 2013-09-09 17:01:32 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2013-09-09 17:01:32 -0400 |
commit | ac2d61dd515e547df6e1fc9e9d438783a201848d (patch) | |
tree | a6b6302ae4e2a2875d9361808be539bb61d1a7c3 /src/libostree/ostree-repo-prune.c | |
parent | b4b700c1635df1a0b02d809d0f17c153fbd826a1 (diff) | |
download | ostree-ac2d61dd515e547df6e1fc9e9d438783a201848d.tar.gz |
core: Add detached metadata, readd metadata to commits
Previously I thought we'd have to ditch the current commit
format to avoid a{sv} due to
See https://bugzilla.gnome.org/show_bug.cgi?id=673012
But I realized that we don't really have to care about
unpacking/repacking commit objects, so let's just re-expose the
existing metadata a{sv} in commits in the API.
Also, add support for "detached" metadata that can be updated at any
time post-commit. This is specifically designed for GPG signatures.
https://bugzilla.gnome.org/show_bug.cgi?id=707379
Diffstat (limited to 'src/libostree/ostree-repo-prune.c')
-rw-r--r-- | src/libostree/ostree-repo-prune.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-prune.c b/src/libostree/ostree-repo-prune.c index caef29e7..4f1db668 100644 --- a/src/libostree/ostree-repo-prune.c +++ b/src/libostree/ostree-repo-prune.c @@ -64,6 +64,13 @@ maybe_prune_loose_object (OtPruneData *data, if (info) { + if (objtype == OSTREE_OBJECT_TYPE_COMMIT) + { + gs_unref_object GFile *detached_metadata = + _ostree_repo_get_commit_metadata_loose_path (data->repo, checksum); + if (!ot_gfile_ensure_unlinked (detached_metadata, cancellable, error)) + goto out; + } if (!gs_file_unlink (objf, cancellable, error)) goto out; data->freed_bytes += g_file_info_get_size (info); |