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
This commit is contained in:
1 parent
7224450591
commit
efcdf4c3f8
4 files changed
+32
No files matched your search
@@ -620,6 +620,18 @@ ostree_repo_is_writable (OstreeRepo *self,
|
||||
return self->writable;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_ostree_repo_update_mtime (OstreeRepo *self,
|
||||
GError **error)
|
||||
{
|
||||
if (futimens (self->repo_dir_fd, NULL) != 0)
|
||||
{
|
||||
glnx_set_prefix_error_from_errno (error, "%s", "futimens");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/**
|
||||
* ostree_repo_get_config:
|
||||
* @self:
|
||||
|
||||
Reference in new issue
Block a user