diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-01-10 22:31:49 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2018-01-10 22:33:52 +0900 |
commit | 8c8880bb8df4931949bad6c3c71d3d912876f747 (patch) | |
tree | 93074913c974dffd312bdf33c557389f075ea893 | |
parent | ab05f80db2c558e754e5feb26609fa8e9b6fa07e (diff) | |
download | buildstream-8c8880bb8df4931949bad6c3c71d3d912876f747.tar.gz |
plugins/sources/local.py: Consider symbolic link target in cache key.
Technically this breaks cache keys for the local source, but as
this comes in a branch which fixes local source cache keys to be
stable (they were random before this branch), we wont bother with
considering this enhancement a separate API break, the cache key
breakage was inescapable anyway.
-rw-r--r-- | buildstream/plugins/sources/local.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/buildstream/plugins/sources/local.py b/buildstream/plugins/sources/local.py index 830df873f..4f4a7b8e3 100644 --- a/buildstream/plugins/sources/local.py +++ b/buildstream/plugins/sources/local.py @@ -106,7 +106,8 @@ def unique_key(filename): if os.path.isdir(filename): return "0" elif os.path.islink(filename): - return "1" + # For a symbolic link, use the link target as it's unique identifier + return os.readlink(filename) return utils.sha256sum(filename) |