Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working towards self-update #582

Closed
wants to merge 2 commits into from
Closed

Conversation

wolfv
Copy link
Member

@wolfv wolfv commented Dec 19, 2023

  • this uses the uncompressed release from Github. We could use the compressed one.
  • It updates unconditionally. We should check wether pixi is in the "default" location (~/.pixi/bin/pixi) and if not, probably not touch it (externally managed by homebrew or conda etc.). Maybe add a --force option to allow overwriting in other locations.
  • The version comparison code is a bit brittle right now but should probably work fine.

@tdejager
Copy link
Contributor

tdejager commented Dec 29, 2023

Nice that you are working on this :)!

Like you said in the comment, I've had problems with this in the past where I've used the command to update a brew installed micromamba and it totally messed up the installation.

If we want to include it, I think we could add the check like you said, or maybe add a feature to not compile it in. So put it behind a feature flag.

Wdyt @baszalmstra and @ruben-arts ?

@baszalmstra
Copy link
Contributor

I feel your pain @tdejager , but dont you think @wolfv s solution to not self-update if the executable is in a non-default location "solves" this?

@tdejager
Copy link
Contributor

Well, if you can still force it, then it would still be a risk. That's why I think putting it behind a (maybe default) feature would be nice :) that way the package manager maintainers have the guarantee it will not happen.

@baszalmstra
Copy link
Contributor

Yeah thats a good idea, but it would mean the package managers always have to build from source to disable the feature.

@tdejager
Copy link
Contributor

Which a lot of them do, or have seperate release for it

@ruben-arts
Copy link
Contributor

What is the status of this PR?

@wolfv
Copy link
Member Author

wolfv commented Jan 12, 2024

dormant but not dead! :)

@hadim
Copy link
Contributor

hadim commented Jan 16, 2024

  • this uses the uncompressed release from Github. We could use the compressed one.
  • It updates unconditionally. We should check wether pixi is in the "default" location (~/.pixi/bin/pixi) and if not, probably not touch it (externally managed by homebrew or conda etc.). Maybe add a --force option to allow overwriting in other locations.
  • The version comparison code is a bit brittle right now but should probably work fine.

Are you guys ok if I try to wrap up that feature in a separate PR but based on this branch?

I feel your pain @tdejager , but dont you think @wolfv s solution to not self-update if the executable is in a non-default location "solves" this?

On that topic, I feel it's best to add the logic within the code itself by checking the location of the binary (versus behind a feature) so packager folks don't have to know or remember this particular point when building pixi and everything is self-contained. But happy to follow what you guys think is best.

@wolfv
Copy link
Member Author

wolfv commented Jan 16, 2024

@hadim if you take over this PR, that would be great! I am pretty busy with rattler-build at the moment so we would highly appreciate your help :)

@hadim hadim mentioned this pull request Jan 16, 2024
@wolfv wolfv closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants