lib: Add ostree_sysroot_init_osname() API, bump mtime
And change the command line to use it. rpm-ostree had a copy of this code, and thus there's a clear reason to have an API. While we're moving this into API, ensure the mtime on deploy is bumped after an osname is created, so that daemons like rpm-ostree can notice changes. (In reality, creating the directory should do this, but let's be double sure)
This commit is contained in:
1 parent
7ace5d35bd
commit
fbd9409ebb
7 files changed
+108
-48
No files matched your search
@@ -1855,12 +1855,8 @@ ostree_sysroot_write_deployments (OstreeSysroot *self,
|
||||
requires_new_bootversion ? "yes" : "no",
|
||||
new_deployments->len - self->deployments->len);
|
||||
|
||||
/* Allow other systems to monitor for changes */
|
||||
if (utimensat (self->sysroot_fd, "ostree/deploy", NULL, 0) < 0)
|
||||
{
|
||||
glnx_set_prefix_error_from_errno (error, "%s", "futimens");
|
||||
goto out;
|
||||
}
|
||||
if (!_ostree_sysroot_bump_mtime (self, error))
|
||||
goto out;
|
||||
|
||||
/* Now reload from disk */
|
||||
if (!ostree_sysroot_load (self, cancellable, error))
|
||||
|
||||
Reference in new issue
Block a user