<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/buildstream.git, branch jjardon/codequality</title>
<subtitle>gitlab.com: buildstream/buildstream.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/'/>
<entry>
<title>.gitlab-ci.yml: Add job to analyze project code quality with Code Climate CLI</title>
<updated>2018-04-24T01:24:45+00:00</updated>
<author>
<name>Javier Jardón</name>
<email>jjardon@gnome.org</email>
</author>
<published>2018-04-24T00:07:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=452508a600aef552cd79bb9b990deaff13b580d1'/>
<id>452508a600aef552cd79bb9b990deaff13b580d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move curent before_script: commands to the only jobs where they are actually needed</title>
<updated>2018-04-24T01:23:11+00:00</updated>
<author>
<name>Javier Jardón</name>
<email>jjardon@gnome.org</email>
</author>
<published>2018-04-24T00:44:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=5e9b74b154dcf1c2d2735d0f6c35e8288167ee1d'/>
<id>5e9b74b154dcf1c2d2735d0f6c35e8288167ee1d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tests/testutils/integration.py: Avoid inconsistent symlink handling</title>
<updated>2018-04-23T13:37:06+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam@droopy.dyn.ducie.codethink.co.uk</email>
</author>
<published>2018-02-28T17:25:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=caa52411c8039a19954b83d3bfa015c44a594661'/>
<id>caa52411c8039a19954b83d3bfa015c44a594661</id>
<content type='text'>
The output of walk_dir() seemed to be inconsistent in how it traversed
symlinks. Presumably this is to do with differences in how the filesystem
return files. If we do an in-place sort of the list of files and directories
that we get, os.walk() will honour that order which should make the output
stable.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The output of walk_dir() seemed to be inconsistent in how it traversed
symlinks. Presumably this is to do with differences in how the filesystem
return files. If we do an in-place sort of the list of files and directories
that we get, os.walk() will honour that order which should make the output
stable.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add compose-symlinks testcase</title>
<updated>2018-04-23T13:37:06+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2018-02-23T17:25:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=3ec1cab15db686a77240b3d30d238c66be505a81'/>
<id>3ec1cab15db686a77240b3d30d238c66be505a81</id>
<content type='text'>
This is a regression test for the issue raised here:
https://gitlab.com/BuildStream/buildstream/issues/270
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a regression test for the issue raised here:
https://gitlab.com/BuildStream/buildstream/issues/270
</pre>
</div>
</content>
</entry>
<entry>
<title>plugins/elements/compose.py: Avoid losing files inside directory symlinks</title>
<updated>2018-04-23T13:37:06+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2018-02-26T16:43:04+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=cb10e2bde71af025eb2f79d24b40a02c718a3c5e'/>
<id>cb10e2bde71af025eb2f79d24b40a02c718a3c5e</id>
<content type='text'>
The logic for determining which files were removed by integration
commands was broken when dealing with files staged within symlink
directories.

This rather weird scenario is only possible because of the way
BuildStream layers artifacts. If artifact 1 contains a symlink from
`/sbin` to `/usr/sbin`, and artifact 2 is staged on top and contains
a file `/sbin/init`, then the resulting filesystem contains a file at
`/usr/sbin/init`.

The manifest used by the compose element is generated from the contents
of the individual artifacts, so it lists the original paths such as
`/sbin/init`, but would would not contain `/usr/sbin/init` as nothing
has processed the symlinks.

The path `/sbin/init` is valid inside the composed tree, but filesystem
traversals that don't follow symlinks will not report that path in their
results. The compose plugin would look for `/sbin/init` in the results
of `utils.list_relative_paths()`, find it missing, and would act as if
some integration command had removed the file. This meant it would not
end up in the results.

To fix this, I have inverted the logic that processes the results of the
integration commands. We now work through every path in the manifest
and check it against the results of the integration commands, rather
than the other way around, and if any path from the manifest doesn't
appear in the snapshot we assume that it has staged in a different
location due to symlinks.

See: https://gitlab.com/BuildStream/buildstream/issues/270
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The logic for determining which files were removed by integration
commands was broken when dealing with files staged within symlink
directories.

This rather weird scenario is only possible because of the way
BuildStream layers artifacts. If artifact 1 contains a symlink from
`/sbin` to `/usr/sbin`, and artifact 2 is staged on top and contains
a file `/sbin/init`, then the resulting filesystem contains a file at
`/usr/sbin/init`.

The manifest used by the compose element is generated from the contents
of the individual artifacts, so it lists the original paths such as
`/sbin/init`, but would would not contain `/usr/sbin/init` as nothing
has processed the symlinks.

The path `/sbin/init` is valid inside the composed tree, but filesystem
traversals that don't follow symlinks will not report that path in their
results. The compose plugin would look for `/sbin/init` in the results
of `utils.list_relative_paths()`, find it missing, and would act as if
some integration command had removed the file. This meant it would not
end up in the results.

To fix this, I have inverted the logic that processes the results of the
integration commands. We now work through every path in the manifest
and check it against the results of the integration commands, rather
than the other way around, and if any path from the manifest doesn't
appear in the snapshot we assume that it has staged in a different
location due to symlinks.

See: https://gitlab.com/BuildStream/buildstream/issues/270
</pre>
</div>
</content>
</entry>
<entry>
<title>plugins/elements/compose.py: Only calculate snapshot when needed</title>
<updated>2018-04-23T13:37:06+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2018-02-26T17:34:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=d423732f7143a862ef54c18c63aac4ef68382e66'/>
<id>d423732f7143a862ef54c18c63aac4ef68382e66</id>
<content type='text'>
This is an optimisation for the case where the compose element doesn't
do any splitting, and also brings 2 related code fragments closer to
each other.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is an optimisation for the case where the compose element doesn't
do any splitting, and also brings 2 related code fragments closer to
each other.
</pre>
</div>
</content>
</entry>
<entry>
<title>plugins/elements/compose.py: Use sets instead of lists where appropriate</title>
<updated>2018-04-23T13:37:06+00:00</updated>
<author>
<name>Sam Thursfield</name>
<email>sam.thursfield@codethink.co.uk</email>
</author>
<published>2018-02-26T17:32:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=4759e2adc20be4847894e484dd9ca8b3ac490ca1'/>
<id>4759e2adc20be4847894e484dd9ca8b3ac490ca1</id>
<content type='text'>
There is no significant order for the lists of added, removed and
modified files, so use an unordered set() to store the data.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is no significant order for the lists of added, removed and
modified files, so use an unordered set() to store the data.
</pre>
</div>
</content>
</entry>
<entry>
<title>bst-here: Add '-p' flag to upgrade buildstream (Issue #291)</title>
<updated>2018-04-23T13:10:18+00:00</updated>
<author>
<name>Tristan Maat</name>
<email>tristan.maat@codethink.co.uk</email>
</author>
<published>2018-03-08T13:52:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=75ebcf56dc03e4cb53ce7739dd3d621fd1d0f2c9'/>
<id>75ebcf56dc03e4cb53ce7739dd3d621fd1d0f2c9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>HACKING.rst: Fixing formatting of titles.</title>
<updated>2018-04-23T13:04:17+00:00</updated>
<author>
<name>Tristan Van Berkom</name>
<email>tristan.vanberkom@codethink.co.uk</email>
</author>
<published>2018-04-23T13:04:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=157899513d32afd702f367a122b6993bc98725e2'/>
<id>157899513d32afd702f367a122b6993bc98725e2</id>
<content type='text'>
Titles have 2 blank lines before them, and no blank lines after them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Titles have 2 blank lines before them, and no blank lines after them.
</pre>
</div>
</content>
</entry>
<entry>
<title>HACKING.rst: Add a section on BST_PROFILE and the artifact cache.</title>
<updated>2018-04-23T13:03:27+00:00</updated>
<author>
<name>Jim MacArthur</name>
<email>jim.macarthur@codethink.co.uk</email>
</author>
<published>2018-04-12T15:29:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/buildstream.git/commit/?id=1cd3728c25593a8b61669d90e56dbc9f73f5b961'/>
<id>1cd3728c25593a8b61669d90e56dbc9f73f5b961</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
