summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-private.h
diff options
context:
space:
mode:
authorMatthew Leeds <matthew.leeds@endlessm.com>2018-07-13 15:53:21 -0700
committerAtomic Bot <atomic-devel@projectatomic.io>2018-07-30 17:19:12 +0000
commit6869bada49ec414837c2b936a761652c66d3f31e (patch)
tree5c808e378b3aab1b92dbe2a8bf334e4833db21bc /src/libostree/ostree-repo-private.h
parentfb36b62f331a7cc5d3d10e53d6db086bf1c18e0c (diff)
downloadostree-6869bada49ec414837c2b936a761652c66d3f31e.tar.gz
config: Add a core/change-update-summary option
This commits adds and implements a boolean repo config option called "change-update-summary" which updates the summary file every time a ref changes (additions, updates, and deletions). The main impetus for this feature is that the `ostree create-usb` and `flatpak create-usb` commands depend on the repo summary being up to date. On the command line you can work around this by asking the user to run `ostree summary --update` but in the case of GNOME Software calling out to `flatpak create-usb` this wouldn't work because it's running as a user and the repo is owned by root. That strategy also means flatpak can't update the repo metadata refs for fear of invalidating the summary. Another use case for this relates to LAN updates. Specifically, the component of eos-updater that generates DNS-SD records advertising ostree refs depends on the repo summary being up to date. Since ostree_repo_regenerate_summary() now takes an exclusive lock, this should be safe to enable. However it's not enabled by default because of the performance cost, and because it's more useful on clients than servers (which likely have another mechanism for updating the summary). Fixes https://github.com/ostreedev/ostree/issues/1664 Closes: #1681 Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-repo-private.h')
-rw-r--r--src/libostree/ostree-repo-private.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-private.h b/src/libostree/ostree-repo-private.h
index 0a447634..4e504326 100644
--- a/src/libostree/ostree-repo-private.h
+++ b/src/libostree/ostree-repo-private.h
@@ -437,6 +437,11 @@ _ostree_repo_get_remote_inherited (OstreeRepo *self,
const char *name,
GError **error);
+gboolean
+_ostree_repo_maybe_regenerate_summary (OstreeRepo *self,
+ GCancellable *cancellable,
+ GError **error);
+
/* Locking APIs are currently private.
* See https://github.com/ostreedev/ostree/pull/1555
*/