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

feat(cli): Allow building without self-update feature #975

Merged
merged 2 commits into from
Jan 1, 2024

Conversation

jirutka
Copy link
Contributor

@jirutka jirutka commented Dec 30, 2023

The self-update subcommand is undesirable if rustic is installed using the system package manager.

@jirutka jirutka changed the title Allow building without self_update command Allow building without self-update subcommand Dec 30, 2023
@simonsan
Copy link
Contributor

simonsan commented Dec 31, 2023

I'm personally not a big fan of self-updating software, and I agree with the sentiment! I'm not sure though, we should completely build without it, the way I know it from e.g. rustup:

dev@TowerPC:/mnt/c/Users/dailyuse> rustup self update
error: self-update is disabled for this build of rustup
error: you should probably use your system package manager to update rustup

I like that more, so essentially being able to replace the command on build time with another implementation saying that it is being build without it and that there is a package manager involved. If we want, we could even make that configurable, so people can add their own message there via an environment variable or essentially just say that they could configure a package manager name (for people that have more than one on their system).

That needs to be documented in the https://github.com/rustic-rs/dev-docs as well, then.

@simonsan simonsan added C-enhancement Category: New feature or request A-cli Area: `rustic` command line interface A-packaging Area: related to packaging labels Dec 31, 2023
auto-merge was automatically disabled December 31, 2023 16:59

Head branch was pushed to by a user without write access

@jirutka
Copy link
Contributor Author

jirutka commented Dec 31, 2023

Okay, I changed it so the self-update subcommand is hidden and prints an error message when invoked.

@simonsan
Copy link
Contributor

simonsan commented Jan 1, 2024

Thank you for the PR! 🚀 And a happy new year! 🥂

@simonsan simonsan changed the title Allow building without self-update subcommand feat(cli): Allow building without self-update feature Jan 1, 2024
@simonsan simonsan added this pull request to the merge queue Jan 1, 2024
Merged via the queue into rustic-rs:main with commit 76cd795 Jan 1, 2024
25 checks passed
@jirutka jirutka deleted the self_update-optional branch January 1, 2024 11:36
algitbot pushed a commit to alpinelinux/aports that referenced this pull request Jan 7, 2024
@alerque
Copy link

alerque commented Apr 26, 2024

c.f. #1139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: `rustic` command line interface A-packaging Area: related to packaging C-enhancement Category: New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants