Skip to content

Commit

Permalink
Merge pull request #3143 from yummypeng/main
Browse files Browse the repository at this point in the history
deploy: Ignore sockets, fifos in /etc/<subdir> during merge
  • Loading branch information
cgwalters committed Jan 23, 2024
2 parents d1d8f4a + eb1e9cf commit 15b64c2
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/libostree/ostree-sysroot-deploy.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,20 @@ 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 15b64c2

Please sign in to comment.