diff options
-rw-r--r-- | buildstream/_artifactcache/cascache.py | 3 | ||||
-rw-r--r-- | buildstream/utils.py | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/buildstream/_artifactcache/cascache.py b/buildstream/_artifactcache/cascache.py index a93ec01ea..78191ccf8 100644 --- a/buildstream/_artifactcache/cascache.py +++ b/buildstream/_artifactcache/cascache.py @@ -684,6 +684,9 @@ class CASCache(ArtifactCache): symlinknode = directory.symlinks.add() symlinknode.name = name symlinknode.target = os.readlink(full_path) + elif stat.S_ISSOCK(mode): + # The process serving the socket can't be cached anyway + pass else: raise ArtifactError("Unsupported file type for {}".format(full_path)) diff --git a/buildstream/utils.py b/buildstream/utils.py index 1aeea52be..60211f35b 100644 --- a/buildstream/utils.py +++ b/buildstream/utils.py @@ -372,6 +372,8 @@ def copy_files(src, dest, *, files=None, ignore_missing=False, report_written=Fa Directories in `dest` are replaced with files from `src`, unless the existing directory in `dest` is not empty in which case the path will be reported in the return value. + + UNIX domain socket files from `src` are ignored. """ presorted = False if files is None: @@ -414,6 +416,8 @@ def link_files(src, dest, *, files=None, ignore_missing=False, report_written=Fa If a hardlink cannot be created due to crossing filesystems, then the file will be copied instead. + + UNIX domain socket files from `src` are ignored. """ presorted = False if files is None: @@ -841,6 +845,13 @@ def _process_list(srcdir, destdir, filelist, actionfunc, result, os.mknod(destpath, file_stat.st_mode, file_stat.st_rdev) os.chmod(destpath, file_stat.st_mode) + elif stat.S_ISFIFO(mode): + os.mkfifo(destpath, mode) + + elif stat.S_ISSOCK(mode): + # We can't duplicate the process serving the socket anyway + pass + else: # Unsupported type. raise UtilError('Cannot extract {} into staging-area. Unsupported type.'.format(srcpath)) |