Stage-packages e2fsprogs not getting pulled when using "to"

Hi,

we have a snap that uses e2fsprogs and is pulling it using stage-packages. This worked fine until a certain point in time, a few days / weeks not sure.

 mkfs-tool:
    plugin: nil
    stage-packages:
      - to amd64:
          - e2fsprogs
          - dosfstools
      - to arm64:
          - e2fsprogs
          - dosfstools

snapcraft only pulls dosfstools and completely ignores e2fsprogs. It does not fail or returns an error, it just ignores e2fsprogs completely.
When changing it to:

 mkfs-tool:
    plugin: nil
    stage-packages:
      - on amd64:
          - e2fsprogs
          - dosfstools
      - on arm64:
          - e2fsprogs
          - dosfstools

It works. But from my understanding, it is wrong that way.

We are building using --destructive-mode and use target-arch=arm64 on an amd64 system.

We couldn’t find any hint why this is not working anymore.

Thanks.

1 Like

I have reproduced this issue and put together a fix: https://github.com/snapcore/snapcraft/pull/3459

Within the hour, you should be able to install this with snap refresh snapcraft --channel edge/pr-3459 – if you would like to confirm this fixes it for you :smiley:

Sorry about the bug!

1 Like

Seems not to work. I tried with and without login, I always get

builder@1073219d3667:~$ sudo snap install snapcraft --    channel=edge/pr-3459
error: requested a non-existing branch on latest/edge for snap "snapcraft": pr-3459

My apologies, I pushed to the wrong repo for the PR to publish:

I opened a new PR, it should install now with:
sudo snap refresh snapcraft --channel=edge/pr-3461