summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-prune.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-09-09 17:01:32 -0400
committerColin Walters <walters@verbum.org>2013-09-09 17:01:32 -0400
commitac2d61dd515e547df6e1fc9e9d438783a201848d (patch)
treea6b6302ae4e2a2875d9361808be539bb61d1a7c3 /src/libostree/ostree-repo-prune.c
parentb4b700c1635df1a0b02d809d0f17c153fbd826a1 (diff)
downloadostree-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.c7
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);