summaryrefslogtreecommitdiff
path: root/src/libostree/ostree-repo-refs.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2015-05-13 21:59:17 -0400
committerColin Walters <walters@verbum.org>2015-05-14 06:33:31 -0400
commitefcdf4c3f86709172cb5e7f1d64ab7f9236bf2e5 (patch)
tree5888093b12786b4ce5dd1d92228ba4a042718a1b /src/libostree/ostree-repo-refs.c
parent7224450591566ee587dfb6835c219178ca941001 (diff)
downloadostree-efcdf4c3f86709172cb5e7f1d64ab7f9236bf2e5.tar.gz
repo: Bump mtime any time we write a ref
External daemons like rpm-ostree want push notification any time a change is made by an external entity. inotify provides notification, but a problem is there's no easy way to monitor all of the refs. In the past, there has been discussion of opt-in recursive timestamps: https://lkml.org/lkml/2013/4/5/307 But in today's world, let's just bump the mtime on the repo itself, as a central inotify point. Closes: https://github.com/GNOME/ostree/pull/111
Diffstat (limited to 'src/libostree/ostree-repo-refs.c')
-rw-r--r--src/libostree/ostree-repo-refs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/libostree/ostree-repo-refs.c b/src/libostree/ostree-repo-refs.c
index bd0b760b..970f5191 100644
--- a/src/libostree/ostree-repo-refs.c
+++ b/src/libostree/ostree-repo-refs.c
@@ -631,6 +631,9 @@ _ostree_repo_write_ref (OstreeRepo *self,
goto out;
}
+ if (!_ostree_repo_update_mtime (self, error))
+ goto out;
+
ret = TRUE;
out:
return ret;