Error in the format of licence specifications

Hi,
when I want to specify 2 licenses in my snapcraft.yaml file, for example GPL-3.0 and MIT, if I follow the syntax given in the documentation, i.e., values separated by a comma, the build generates an error.
I tried several syntaxes:

cannot validate license "GPL-3.0, MIT": unknown license: GPL-3.0,
cannot validate license "GPL-3.0 , MIT": unexpected string: ","

This one works:

license: GPL-3.0 AND MIT

If this is the right way to go, the doc must be corrected.

I confirm that the last syntax is the correct one. I tried with this:
license: GPL-3.0 MIT
and snapcraft returned:
cannot validate license "GPL-3.0 MIT": missing AND or OR between "GPL-3.0" and "MIT"

Glad you figured it out. That documentation:

Examples: GPL-3.0+, MIT, Proprietary

is not clear. It’s showing 3 separate examples, not one example with 3 licenses.

We’ve been rewriting the schema reference here and examples are now separate lines to be more readable, but we haven’t populated examples for licenses yet.

1 Like

Thank you for your reply. In fact, that’s what I’d come to understand.
I know it’s a big job to maintain the documentation, but it’s so important. Congrats!

1 Like