Here is a minimal snapcraft.yaml with which I can reproduce the problem using Snapcraft 7.1.3:
name: chromium
version: "1"
summary: Chromium web browser, open-source version of Chrome
description: |
An open-source browser project that aims to build a safer, faster, and more
stable way for all Internet users to experience the web.
confinement: strict
base: core20
assumes:
- snapd2.43 # for 'snapctl is-connected', used in chromium.launcher
compression: lzo
parts:
va-drivers:
plugin: nil
stage-packages:
- mesa-vulkan-drivers
override-stage:
set -ex
snapcraftctl stage
prime:
- usr/**/libvulkan_*.so
- usr/**/libVkLayer_*.so
$ snapcraft --debug --use-lxd
Pulling va-drivers
+ snapcraftctl pull
Building va-drivers
+ snapcraftctl build
Staging va-drivers
+ set -ex snapcraftctl stage
Priming va-drivers
+ snapcraftctl prime
[Errno 2] No such file or directory: '/root/stage/usr'
...
snapcraft-chromium # find / -name 'libVk*' 2>/dev/null
/root/parts/va-drivers/install/usr/lib/x86_64-linux-gnu/libVkLayer_MESA_overlay.so
/root/parts/va-drivers/install/usr/lib/x86_64-linux-gnu/libVkLayer_MESA_device_select.so
I expected that, since mesa-vulkan-drivers
is in stage-packages
, its contents showed up in /root/stage
.
Am I wrong in my assumptions or is there something awry in Snapcraft?