Jürg Billeter pushed to branch valentindavid/absolute-whitelist at BuildStream / buildstream
Commits:
-
c8cd24b9
by Jonathan Maw at 2019-02-18T17:37:00Z
-
de70f8c0
by Jonathan Maw at 2019-02-18T18:57:45Z
-
00b86b19
by Chandan Singh at 2019-02-18T18:59:31Z
-
067a0c6b
by Chandan Singh at 2019-02-18T20:31:10Z
-
fca37d0d
by Chandan Singh at 2019-02-19T06:37:04Z
-
5f0571d1
by Jürg Billeter at 2019-02-19T07:37:21Z
-
e2074693
by Gökçen Nurlu at 2019-02-19T07:44:54Z
-
cfbe409d
by Jürg Billeter at 2019-02-19T09:00:31Z
-
1ae17968
by Valentin David at 2019-02-19T09:01:48Z
8 changed files:
- .gitlab-ci.yml
- NEWS
- buildstream/_yaml.py
- buildstream/element.py
- doc/badges.py
- tests/frontend/overlaps/a-whitelisted.bst
- tests/frontend/overlaps/b-whitelisted.bst
- tests/frontend/overlaps/c-whitelisted.bst
Changes:
... | ... | @@ -160,7 +160,7 @@ tests-wsl: |
160 | 160 |
|
161 | 161 |
script:
|
162 | 162 |
- "${TEST_COMMAND}"
|
163 |
- when: manual
|
|
163 |
+ allow_failure: true
|
|
164 | 164 |
|
165 | 165 |
# Automatically build documentation for every commit, we want to know
|
166 | 166 |
# if building documentation fails even if we're not deploying it.
|
... | ... | @@ -138,6 +138,9 @@ buildstream 1.3.1 |
138 | 138 |
o BREAKING CHANGE: Symlinks are no longer resolved during staging and absolute
|
139 | 139 |
symlinks are now preserved instead of being converted to relative symlinks.
|
140 | 140 |
|
141 |
+ o BREAKING CHANGE: Overlap whitelists now require absolute paths. This allows
|
|
142 |
+ use of variables such as %{prefix} and matches the documentation.
|
|
143 |
+ |
|
141 | 144 |
|
142 | 145 |
=================
|
143 | 146 |
buildstream 1.1.5
|
... | ... | @@ -940,7 +940,7 @@ def node_sanitize(node): |
940 | 940 |
return [node_sanitize(elt) for elt in node]
|
941 | 941 |
|
942 | 942 |
# Finally ChainMap and dict, and other Mappings need special handling
|
943 |
- if node_type in (dict, ChainMap) or isinstance(node, collections.Mapping):
|
|
943 |
+ if node_type in (dict, ChainMap) or isinstance(node, collections.abc.Mapping):
|
|
944 | 944 |
result = SanitizedDict()
|
945 | 945 |
|
946 | 946 |
key_list = [key for key, _ in node_items(node)]
|
... | ... | @@ -1620,12 +1620,12 @@ class Element(Plugin): |
1620 | 1620 |
self.__dynamic_public = _yaml.node_copy(self.__public)
|
1621 | 1621 |
|
1622 | 1622 |
# Call the abstract plugin methods
|
1623 |
- try:
|
|
1624 |
- # Step 1 - Configure
|
|
1625 |
- self.__configure_sandbox(sandbox)
|
|
1626 |
- # Step 2 - Stage
|
|
1627 |
- self.stage(sandbox)
|
|
1628 | 1623 |
|
1624 |
+ # Step 1 - Configure
|
|
1625 |
+ self.__configure_sandbox(sandbox)
|
|
1626 |
+ # Step 2 - Stage
|
|
1627 |
+ self.stage(sandbox)
|
|
1628 |
+ try:
|
|
1629 | 1629 |
if self.__batch_prepare_assemble:
|
1630 | 1630 |
cm = sandbox.batch(self.__batch_prepare_assemble_flags,
|
1631 | 1631 |
collect=self.__batch_prepare_assemble_collect)
|
... | ... | @@ -2609,7 +2609,7 @@ class Element(Plugin): |
2609 | 2609 |
if include_file and not exclude_file:
|
2610 | 2610 |
yield filename.lstrip(os.sep)
|
2611 | 2611 |
|
2612 |
- def __file_is_whitelisted(self, pattern):
|
|
2612 |
+ def __file_is_whitelisted(self, path):
|
|
2613 | 2613 |
# Considered storing the whitelist regex for re-use, but public data
|
2614 | 2614 |
# can be altered mid-build.
|
2615 | 2615 |
# Public data is not guaranteed to stay the same for the duration of
|
... | ... | @@ -2621,7 +2621,7 @@ class Element(Plugin): |
2621 | 2621 |
whitelist_expressions = [utils._glob2re(self.__variables.subst(exp.strip())) for exp in whitelist]
|
2622 | 2622 |
_expression_ = ('^(?:' + '|'.join(whitelist_expressions) + ')$')
|
2623 | 2623 |
self.__whitelist_regex = re.compile(_expression_)
|
2624 |
- return self.__whitelist_regex.match(pattern)
|
|
2624 |
+ return self.__whitelist_regex.match(os.path.join(os.sep, path))
|
|
2625 | 2625 |
|
2626 | 2626 |
# __extract():
|
2627 | 2627 |
#
|
... | ... | @@ -96,7 +96,7 @@ def parse_tag(tag): |
96 | 96 |
def guess_version(release):
|
97 | 97 |
try:
|
98 | 98 |
tags_output = subprocess.check_output(['git', 'tag'])
|
99 |
- except CalledProcessError:
|
|
99 |
+ except subprocess.CalledProcessError:
|
|
100 | 100 |
return (0, 0, 0)
|
101 | 101 |
|
102 | 102 |
# Parse the `git tag` output into a list of integer tuples
|
... | ... | @@ -10,4 +10,4 @@ sources: |
10 | 10 |
public:
|
11 | 11 |
bst:
|
12 | 12 |
overlap-whitelist:
|
13 |
- - "file*"
|
|
13 |
+ - "/file*"
|
... | ... | @@ -8,9 +8,9 @@ sources: |
8 | 8 |
- kind: local
|
9 | 9 |
path: "b"
|
10 | 10 |
variables:
|
11 |
- FILE: file
|
|
11 |
+ FILE: /file
|
|
12 | 12 |
public:
|
13 | 13 |
bst:
|
14 | 14 |
overlap-whitelist:
|
15 |
- - file2
|
|
15 |
+ - /file2
|
|
16 | 16 |
- "%{FILE}3"
|
... | ... | @@ -8,4 +8,4 @@ sources: |
8 | 8 |
public:
|
9 | 9 |
bst:
|
10 | 10 |
overlap-whitelist:
|
11 |
- - "file*"
|
|
11 |
+ - "/file*"
|