-
354c563d
by Jürg Billeter
at 2019-02-10T20:03:46Z
import.py: Validate config node
Fixes #662.
-
5e1be71f
by Jürg Billeter
at 2019-02-11T05:10:56Z
Merge branch 'juerg/import' into 'master'
import.py: Validate config node
Closes #662
See merge request BuildStream/buildstream!1141
-
99e1be45
by Jürg Billeter
at 2019-02-11T05:12:25Z
local.py: Do not follow symlinks in local directories
isdir() follows symlinks on the host, resulting in potential host
contamination. This change reorders the file checks to avoid this issue.
-
f95e222e
by Jürg Billeter
at 2019-02-11T05:12:25Z
sandbox/sandbox.py: Do not follow symlinks in _has_command()
This is required to ensure symlinks are not resolved on the host.
-
89973fb3
by Jürg Billeter
at 2019-02-11T05:12:25Z
utils.py: Remove list_dirs parameter from list_relative_paths()
list_dirs was always True in the BuildStream code base. There was also a
bug in the list_dirs=False code path as it did not return symlinks in
`dirnames`.
This is an API break, however, there are no known external callers.
-
d1da3fb0
by Jürg Billeter
at 2019-02-11T05:12:25Z
utils.py: Fix sorting of symlinks to directories
os.walk() resolves symlinks to check whether they point to a directory
even when followlinks is set to False. We already work around that
broken behavior by extracting symlinks from `dirnames`. However, the
sort order was still incorrect as we returned symlinks in dirnames
before files and other symlinks. This change fixes this, sorting all
files and symlinks in a single list.
-
7cf67ed3
by Jürg Billeter
at 2019-02-11T05:12:25Z
_casbaseddirectory.py: Do not mimic os.walk() in list_relative_paths()
This matches the change in utils.list_relative_paths() that now sorts
all symlinks as files, instead of following the broken behavior of
os.walk().
-
7ec0bb5e
by Jürg Billeter
at 2019-02-11T05:44:20Z
tests/sources/local.py: Add directory symlink test
-
c07cc967
by Jürg Billeter
at 2019-02-11T07:13:28Z
Merge branch 'juerg/symlinks' into 'master'
Symlink fixes
See merge request BuildStream/buildstream!1138
-
61729451
by Jürg Billeter
at 2019-02-11T07:16:18Z
projectconfig.yaml: Consistently include directories in split rules
Most split rules already included the relevant directories themselves in
addition to the directory contents. Add the missing bin, sbin, and
libexec directories.
This is required to fix tests with the following commit that changes
list_relative_paths() to return all directories.
-
a0681216
by Jürg Billeter
at 2019-02-11T07:16:18Z
tests/integration/project: Add tests directory to split rule
This is required to fix tests with the following commit that changes
list_relative_paths() to return all directories.
-
fb01180d
by Jürg Billeter
at 2019-02-11T07:16:18Z
utils.py: Return all directories in list_relative_paths()
Returning only empty directories leads to inconsistencies when computing
a manifest by combining results from multiple list_relative_paths()
calls as done by the compose plugin.
I.e., the same directory may be empty in one dependency and non-empty in
another dependency. The merged file list will still contain that
directory even though it's no longer empty.
This inconsistency causes problems when calculating differences between
manifests. Returning all directories fixes these inconsistencies.
This is a change in API behavior.
-
302939c9
by Jürg Billeter
at 2019-02-11T07:16:18Z
_casbaseddirectory.py: Return all directories in list_relative_paths()
This matches the change in utils.list_relative_paths().
-
244b80cd
by Jürg Billeter
at 2019-02-11T07:18:29Z
utils.py: Change _ensure_real_directory() to not resolve symlinks
Resolving symlinks during staging causes various issues:
* Split rules may not work properly as the resolved paths will differ
depending on whether another artifact with a directory symlink has
been staged in the same root directory or not, e.g., as part of
compose.
* The order of symlinks in file lists is difficult to get right to
guarantee consistent and predictable behavior as paths in a file list
might rely on symlinks in the same file list. See #647 and #817.
* Staging order differences can lead to surprising results.
* Difficult to properly support absolute symlinks. Absolute symlinks are
currently converted to relative symlinks, however, this doesn't always
work. See #606 and #830.
This will require changes in projects that rely on the current behavior.
However, the changes are expected to be small and are often a sign of
buggy element files. E.g., elements that don't fully obey `bindir` or
`sbindir` variables.
-
3918fea8
by Jürg Billeter
at 2019-02-11T07:18:29Z
WIP: _casbaseddirectory.py: Do not resolve symlinks
This matches the change in utils._process_list().
This also removes the _Resolver class as it is now unused. We may want
to support controlled symlink resolution in the future, in which case
the _Resolver class can be resurrected from this commit.
WIP: CAS import tests are marked as xfail as they haven't been updated
yet to match the new behavior.
-
cd5cde7b
by Jürg Billeter
at 2019-02-11T07:18:29Z
utils.py: Do not mangle absolute symlinks
Copy symlinks as they are, absolute or relative. We no longer resolve
symlinks when copying files, which makes this safe.
-
c4e2cc74
by Jürg Billeter
at 2019-02-11T07:18:29Z
Bump artifact version for changes in symlink handling
-
d77244d9
by Jürg Billeter
at 2019-02-11T07:18:29Z
NEWS: Add entry for change in symlink handling