Skip to content

Conversation

@awesomebytes
Copy link
Contributor

Motivation

Following this issue/conversation: #203

I went ahead and implement a first proposal on adding a flag that allows to skip the platform check in pixi unpack.

I realise this is probably not ideal naming, not ideal update to the validate_metadata_file function, and not ideal update to the docs. Happy to address comments and ideas in the PR :)

Thanks to anyone reading this!

Changes

  • Added flag --allow-incompatible-target to skip the platform check when doing pixi unpack.
  • Updated and added test.
  • Updated docs.

If updating documentation:

@awesomebytes awesomebytes force-pushed the awesomebytes/skip_platform_check branch from ed23309 to 655ae75 Compare August 3, 2025 20:48
@awesomebytes awesomebytes changed the title First proposal of adding a flag to skip the platform check feat: First proposal of adding a flag to skip the platform check on pixi-unpack Aug 3, 2025
@github-actions github-actions bot added the enhancement New feature or request label Aug 3, 2025
Copy link
Member

@delsner delsner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution! I'm fine with this change, wdyt @pavelzw? @awesomebytes could you please run pixi run pre-commit-run to fix the pre-commit CI? Thanks!

Comment on lines +129 to +130
> You can only `pixi-unpack` a pack on a system that has the same platform as the pack was created for. However, this check can be
skipped by using `--allow-incompatible-target`. This can be useful when using `pixi-unpack` to explore a different platform environment, or re-package it with other tools.
Copy link
Member

@delsner delsner Aug 4, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> You can only `pixi-unpack` a pack on a system that has the same platform as the pack was created for. However, this check can be
skipped by using `--allow-incompatible-target`. This can be useful when using `pixi-unpack` to explore a different platform environment, or re-package it with other tools.
> You can only `pixi-unpack` a pack on a system that has the same platform as the pack was created for. However, this check can be
skipped by using `--allow-incompatible-target`. This can be useful when testing `pixi-unpack` on a platform different to the target platform, or re-package the environment with other tools.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add an integration test here that only runs on platform X, packages an environment for platform Y and unpacks it again on platform X using --allow-incompatible-target?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants