Skip to content

Commit

Permalink
sysroot: Bump mtime when writing an origin file
Browse files Browse the repository at this point in the history
This ensures that e.g. `rpm-ostreed` will get notified of the changes.
  • Loading branch information
cgwalters committed Feb 26, 2018
1 parent 971265e commit 8a87b1d
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/libostree/ostree-sysroot-deploy.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,9 @@ merge_configuration (OstreeSysroot *sysroot,
return TRUE;
}

/* Write the origin file for a deployment. */
/* Write the origin file for a deployment; this does not bump the mtime, under
* the assumption the caller may be writing multiple.
*/
static gboolean
write_origin_file_internal (OstreeSysroot *sysroot,
OstreeDeployment *deployment,
Expand Down Expand Up @@ -903,9 +905,15 @@ ostree_sysroot_write_origin_file (OstreeSysroot *sysroot,
GCancellable *cancellable,
GError **error)
{
return write_origin_file_internal (sysroot, deployment, new_origin,
GLNX_FILE_REPLACE_DATASYNC_NEW,
cancellable, error);
if (!write_origin_file_internal (sysroot, deployment, new_origin,
GLNX_FILE_REPLACE_DATASYNC_NEW,
cancellable, error))
return FALSE;

if (!_ostree_sysroot_bump_mtime (sysroot, error))
return FALSE;

return TRUE;
}

typedef struct {
Expand Down

0 comments on commit 8a87b1d

Please sign in to comment.