Hash mismatch when creating noarch packages for multiple target platforms
In our pixi tests we create the same package for multiple target platforms. With rattler-build version >= 0.37, installing one of these packages fails with a hash mismatch if it's a noarch package.
Here is a minimal reproducer:
# recipe.yaml
package:
name: pixi-editor
version: "0.1.3"
build:
noarch: generic
Then run the following commands:
rattler-build build --target-platform linux-64 --recipe-dir recipe
rattler-build build --target-platform win-64 --recipe-dir recipe
pixi global install --channel ./output pixi-editor
I think the problem here is that the build string is identical and something breaks down in the indexing, perhaps.
One way to work around it would be to change the build string like this:
build:
string: ${{ hash }}_${{ "win" if target_platform == "win-64" else "unix" }}
I think the problem here is that the build string is identical and something breaks down in the indexing, perhaps.
One way to work around it would be to change the build string like this:
build: string: ${{ hash }}_${{ "win" if target_platform == "win-64" else "unix" }}
I assume that will become a bit verbose with four target platform, right? https://github.com/prefix-dev/pixi/blob/1721cc4133d3e9e4571bf0d1740f5716d40315e7/tests/data/channels/update-channels.py#L13
I'm not sure I understand why it needs to be built for different target platforms if it's noarch in the first place? :)
I'm not sure I understand why it needs to be built for different target platforms if it's noarch in the first place? :)
Yeah, I could just remove the noarch for these recipes as a workaround
I meant the other way around - you only need to build the package once and not for all the target platforms.
I meant the other way around - you only need to build the package once and not for all the target platforms.
Most recipes have multiple outputs. How would the script handle recipes that contain both noarch and arch-specific packages?
The noarch packages might have different hashes but have the same names and thus would be rejected from being uploaded. Or you could skip buolding the noarch package on the platforms that you don't want