linker: Remove check after copying file

After a file is copied, a check was done if size and mtime of the files
match.

This has very few benefits in what problems it can detect, and can cause
problems on NFS where it can take a short time before the updated
attributes are visible on the new location.

JIRA: RHELCMP-378
Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2020-04-20 11:26:17 +02:00
parent 30f4771db1
commit 1a5cd9e0bf

View File

@ -201,11 +201,6 @@ class Linker(kobo.log.LoggingBase):
shutil.copy2(src, dst) shutil.copy2(src, dst)
self._inode_map[src_key] = dst self._inode_map[src_key] = dst
if not self._is_same(src, dst):
self.log_error("File %s doesn't match the copied file %s" % (src, dst))
# XXX:
raise OSError(errno.EEXIST, "File exists")
def _link_file(self, src, dst, link_type): def _link_file(self, src, dst, link_type):
if link_type == "hardlink": if link_type == "hardlink":
self.hardlink(src, dst) self.hardlink(src, dst)