I setup glpi-agent to being automatically built by the new store building system. Because of intel based arch, I include dmidecode to parse its output. So dmidecode is listed in my stage-packages list. I understand this package is not available for s390x & ppc64el as these arch are not providing any dmi informations.
So is there a simple way to exclude this package for s390x & ppc64el or do I have to handle that package installation into a override-stage scriptlet ?
Of course, I still can exclude these arch from the builds as they are not our primary arch target and I don’t even know if anyone could be interested to install glpi-agent on these archs.
I’d certainly suppress building on unneeded architectures. It’s a waste of resources to spin up a machine, get it all prepared and then throw the build away half way through because it’s the wrong architecture.
However, that said, it’s possible to dpkg --print-architecture in your override-stage or whatever, to detect what arch you’re on and do conditional things as a result. We use this a lot in override-pull to grab the correct assets in building snaps.
I’ll probably disable these archs after I manage to figure out this problem to avoid wasting resources but I’m still interested to know if we can have support for them in the case someone needs it.
But I’m facing a YAML syntax error on GH build and, sorry, I don’t see what is wrong:
/usr/bin/sg lxd -c snapcraft
Issues while validating snap/snapcraft.yaml: did not find expected '-' indicator on line 184, column 7
Error: The process '/usr/bin/sg' failed with exit code 2
I also tried locally different syntaxes and didn’t figure out what is wrong.
Humpf, my humble fault
And I apologize for the noise.
Indeed, my commit was wrong as just one space was missing. I saw that early, but I was facing some cache issue locally with my snapcraft --debug --lxd that was still failing as it didn’t update the snapcraft.yaml… I finally find how to make a LXD clean build. Then after running snapcraft clean --debug --lxd, I finally saw the error fixed locally and it builds actually on GH.