Missing grammar for conditional configflags on/to architecture

Bug #1831752 reported by Frode Nordahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snapcraft
New
Undecided
Unassigned

Bug Description

Creating a snap that will support many architectures require conditional ``configflags``.

The grammar available for ``build-packages`` and ``stage-packages`` would be nice to also have for ``configflags``.

(A side note is that the existing support for build/stage-packages could grow the ability to list multiple architectures so you don't have to repeat entries that are true for multiple archs)

Mock-up that matches existing grammar for build/stage-packages:
parts:
  qemu:
    plugin: autotools
    configflags:
      - on amd64:
        - --enable-xen
      - on i386:
        - --enable-xen

Even better:
parts:
  qemu:
    plugin: autotools
    configflags:
      ?
        - all
      :
        - "--enable-something-everywhere"
      ?
        - amd64
        - i386
      :
        - "--enable-xen"

Revision history for this message
Frode Nordahl (fnordahl) wrote :

Just a quick note on this; it turns out that using ``qemu`` as an example is a bad example as its configure script will build the above mentioned feature by default based on presence of the library on the build host.

I'm sure the request is still valid for some use cases though.

Having this capability for the ``build-environment`` could also be a very powerful tool.

Reference to where I ran into the issue: https://github.com/openstack-charmers/octavia-diskimage-retrofit/pull/2

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.