Skip to content

bst source-bundle fail's for the examples.

Summary

Buildstream source-bundle fail's for the examples.

Steps to reproduce

steps:

  • cd buildstream/doc/examples/flatpak-autotools
  • bst build hello.bst
  • bst source-bundle hello.bst

What is the current bug behaviour?

bst reports a bug and: FileNotFoundError: [Errno 2] No such file or directory: '/home/will/.cache/buildstream/build/hello-y64su587/source/base-sdk'

What is the expected correct behavior?

Creates a folder/zip of the sources so you can build the element yourself. (I have not got this to work but I believe it should be a bit like a workspace but without the option to build in it.)

Relevant logs and/or screenshots


 will  CT-will-S-Deb  ~  projects  …  doc  examples  flatpak-autotools $ bst source-bundle hello.bst
[--:--:--][][] START   Loading elements
[00:00:00][][] SUCCESS Loading elements
[--:--:--][][] START   Resolving elements
[00:00:00][][] SUCCESS Resolving elements
[--:--:--][][] START   Resolving cached state
[00:00:00][][] SUCCESS Resolving cached state
[--:--:--][][] INFO    Bundling sources for target hello.bst
[--:--:--][][] START   Checking sources
[00:00:00][][] SUCCESS Checking sources
[--:--:--][d34ccf53][ main:base/sdk.bst                  ] START   Writing build script
[00:00:00][d34ccf53][ main:base/sdk.bst                  ] SUCCESS Writing build script
[--:--:--][94d6556f][ main:base/usrmerge.bst             ] START   Writing build script
[00:00:00][94d6556f][ main:base/usrmerge.bst             ] SUCCESS Writing build script
[--:--:--][cf34223f][ main:hello.bst                     ] START   Writing build script
[00:00:00][cf34223f][ main:hello.bst                     ] SUCCESS Writing build script
[--:--:--][d34ccf53][ main:base/sdk.bst                  ] START   Staging sources
[--:--:--][][] BUG     [Errno 2] No such file or directory: '/home/will/.cache/buildstream/build/hello-y64su587/source/base-sdk'

    Traceback (most recent call last):
      File "/home/will/.local/bin/bst", line 8, in <module>
        sys.exit(cli())
      File "/home/will/.local/lib/python3.5/site-packages/click/core.py", line 722, in __call__
        return self.main(*args, **kwargs)
      File "/home/will/projects/buildstream/buildstream/buildstream/_frontend/cli.py", line 162, in override_main
        standalone_mode=standalone_mode, **extra)
      File "/home/will/.local/lib/python3.5/site-packages/click/core.py", line 697, in main
        rv = self.invoke(ctx)
      File "/home/will/.local/lib/python3.5/site-packages/click/core.py", line 1066, in invoke
        return _process_result(sub_ctx.command.invoke(sub_ctx))
      File "/home/will/.local/lib/python3.5/site-packages/click/core.py", line 895, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/home/will/.local/lib/python3.5/site-packages/click/core.py", line 535, in invoke
        return callback(*args, **kwargs)
      File "/home/will/.local/lib/python3.5/site-packages/click/decorators.py", line 27, in new_func
        return f(get_current_context().obj, *args, **kwargs)
      File "/home/will/projects/buildstream/buildstream/buildstream/_frontend/cli.py", line 831, in source_bundle
        except_targets=except_)
      File "/home/will/projects/buildstream/buildstream/buildstream/_stream.py", line 723, in source_bundle
        self._write_element_sources(tempdir, elements)
      File "/home/will/projects/buildstream/buildstream/buildstream/_stream.py", line 1092, in _write_element_sources
        element._stage_sources_at(element_source_dir)
      File "/home/will/projects/buildstream/buildstream/buildstream/element.py", line 1374, in _stage_sources_at
        if not vdirectory.is_empty():
      File "/home/will/projects/buildstream/buildstream/buildstream/storage/_filebaseddirectory.py", line 179, in is_empty
        self._populate_index()
      File "/home/will/projects/buildstream/buildstream/buildstream/storage/_filebaseddirectory.py", line 61, in _populate_index
        for entry in os.listdir(self.external_directory):
    FileNotFoundError: [Errno 2] No such file or directory: '/home/will/.cache/buildstream/build/hello-y64su587/source/base-sdk'

Possible fixes

...

Other relevant information

This was discovered while working on #512 (closed) but fixing this is not required to close it.

  • BuildStream version affected: master (c6155f8d) /milestone %BuildStream_v1.x

Edited by William Salmon
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information