Can package-repositories depend on architecture?

I’m trying to use package-repositories to replace existing hacks to add PPAs.

But I’ve run into a problem: one of the PPAs I use only supports Intel architectures and, if I add it, I get dependency errors on ARM architectures.

What I’d like to do is something like (for lack of a valid grammar):

package-repositories:
  to amd64:
    - type: apt
      ppa: team-xbmc/ppa

Note that architectures doesn’t appear to do what I want as this also gives errors on ARM builds:

package-repositories:
  - type: apt
    components: [main]
    suites: [focal]
    key-id: 189701DA570C56B9488EF60A6D975C4791E7EE5E
    url: http://ppa.launchpad.net/team-xbmc/ppa/ubuntu
    architectures: [amd64]

(The snap I’m experimenting with is https://github.com/MirServer/mir-kiosk-kodi)

I have wanted to do this before and what I found at the time is that package-repositories did not support the advanced grammar, so what you provided doesn’t work, but IMHO it should be made to work since the advanced grammar bits are very powerful/useful :slight_smile: