Skip to content

Commit

Permalink
deploy: Ignore sockets, fifos in /etc/<subdir> during merge
Browse files Browse the repository at this point in the history
It's a followup of commit e6a560b.
We should also ignore sockets and fifos in the subdir of /etc.

Signed-off-by: Yuanhong Peng <[email protected]>
  • Loading branch information
yummypeng committed Jan 22, 2024
1 parent d1d8f4a commit 023a5d9
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/libostree/ostree-sysroot-deploy.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,19 @@ copy_dir_recurse (int src_parent_dfd, int dest_parent_dfd, const char *name,
}
else
{
if (!glnx_file_copy_at (src_dfd_iter.fd, dent->d_name, &child_stbuf, dest_dfd,
dent->d_name,
sysroot_flags_to_copy_flags (GLNX_FILE_COPY_OVERWRITE, flags),
cancellable, error))
return glnx_prefix_error (error, "Copying %s", dent->d_name);
if (S_ISLNK (child_stbuf.st_mode) || S_ISREG (child_stbuf.st_mode))
{
if (!glnx_file_copy_at (src_dfd_iter.fd, dent->d_name, &child_stbuf, dest_dfd,
dent->d_name,
sysroot_flags_to_copy_flags (GLNX_FILE_COPY_OVERWRITE, flags),
cancellable, error))
return glnx_prefix_error (error, "Copying %s", dent->d_name);
}
else
{
ot_journal_print (LOG_INFO,
"Ignoring non-regular/non-symlink file found during /etc merge: %s", dent->d_name);
}
}
}

Expand Down

0 comments on commit 023a5d9

Please sign in to comment.