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

Add --update flag with warning messages. #28

Merged
merged 3 commits into from
Sep 15, 2022

Conversation

arcuru
Copy link
Contributor

@arcuru arcuru commented Jun 24, 2022

This change adds a new flag, --update, that will invoke nix-index to update the database.

Along with this change I've added better warning and error messages when dealing with a missing database. The user will now be warned, and told the appropriate remedy, if the database is missing or older than 30 days.

Unfortunately I did need to add another dependency to handle xdg settings correctly. I don't think it added too much size to the binary, but we should probably pay attention to that since this is now a 1MB binary instead of a <100 line bash script.

This was prompted by the UX issues seen in #21, and #23, which were created in #18

@Artturin
Copy link
Member

Cool, could you split the index related functions to a separate file?

downloading the prebuilt index instead of building it would be a plus but not necessary in this PR https://github.com/Mic92/nix-index-database

i wouldn't worry about the size as long as its under 100MB

@arcuru
Copy link
Contributor Author

arcuru commented Jun 27, 2022

No problem, I've factored out those helper functions into a separate module but I didn't implement the direct downloads.

Also, please feel free to re-word any of these changes. I'm not that familiar with this area, so I ended up referring to the file as the "nix-index database" but you may prefer to refer to it as just the "index" or something else.

@Artturin
Copy link
Member

Artturin commented Jul 10, 2022

Please rebase and check #26

@arcuru
Copy link
Contributor Author

arcuru commented Jul 11, 2022

Done.

@Artturin
Copy link
Member

Awesome, Thank you!

@Artturin Artturin merged commit 0ab044f into nix-community:master Sep 15, 2022
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.

2 participants