melange
melange copied to clipboard
subpackages if: does not seem to contain substitutions
package:
name: wolfi-base
version: 1
epoch: 7
description: "Wolfi base metapackage"
copyright:
- license: MIT
dependencies:
runtime:
- apk-tools
- busybox
- wolfi-keys
environment:
contents:
packages:
- busybox
pipeline:
- name: Install
runs: |
mkdir -p "${{targets.destdir}}"
subpackages:
- if: ${{build.arch}} == 'x86_64'
name: "${{package.name}}-x86"
description: "empty x86 package"
pipeline:
- runs: |
echo build arch is ${{build.arch}}
- if: ${{build.arch}} == 'aarch64'
name: "${{package.name}}-arm64"
description: "empty arm64 package"
pipeline:
- runs: |
echo build arch is ${{build.arch}}
update:
enabled: false
During build expect one of the subpackages to be produced, but instead none are:
2024/07/15 14:11:03 INFO evaluating pipelines for package requirements
2024/07/15 14:11:03 INFO skipping subpackage wolfi-base-x86 because ${{build.arch}} == 'x86_64' == false
2024/07/15 14:11:03 INFO skipping subpackage wolfi-base-arm64 because ${{build.arch}} == 'aarch64' == false
2024/07/15 14:11:03 INFO populating workspace /home/xnox/.cache/melange-tmp/melange-workspace-3916530863 from ./wolfi-base/
There are attempts to substitute variables, but maybe not the one in question?
It fills to me that the substituion map computed in compile.go and substituted into subpackage.... doesn't actually modify the subpackage struct, and thus doesn't change the value of it upon exit back to build.go. Meaning evaluation of sp.If after Compile() does not actually see substituted values.
Ideally want to use this to skip building empty libquadmath on arm64.