]> code.ossystems Code Review - openembedded-core.git/commit
lib/oe/path: try hardlinking instead of guessing when it might fail
authorHenning Schild <henning.schild@siemens.com>
Fri, 24 Jan 2020 13:48:47 +0000 (14:48 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 4 Feb 2020 15:56:24 +0000 (15:56 +0000)
commitf5571bda8327f927feb23b167ab4594b7d0c95bc
tree6d4cfb48f15c5b6253dbb4a2f37631b8bf034070
parent1bb2aa53a74e36dc3ba901b9d8ce780e7880cef8
lib/oe/path: try hardlinking instead of guessing when it might fail

The comparison of the stat st_dev is not enough to judge whether
hardlinking will work. One example would be where you try and hardlink
across two bind-mounts of a directory. The st_dev will be the same and
the operation will still fail.

Instead of implementing a check to try and figure out hardlink support
just try hardlinking and fall back to a copy when running into an
exception.

Signed-off-by: Henning Schild <henning.schild@siemens.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/lib/oe/path.py