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

fix:[#411] stacks update asks for new list of pkgs #412

Merged
merged 1 commit into from
Oct 17, 2024

Conversation

jardon
Copy link
Member

@jardon jardon commented Oct 16, 2024

this PR addresses both of the below issues in one sweep. it reworks the prompting of the user for an update.

  • stacks update asks if pkgs need to be updated
  • takes a space-separated list of packages to replace
jardon@lagann:~/Projects/apx$ ./apx stacks update noble
 INFO  Type a new base or confirm the current one (ubuntu:noble):

 INFO  Choose a new package manager or confirm the current one (apt):

 INFO  You have not provided any packages to install in the stack. Do you want to add some now?[y/N]
y
 INFO  Type the packages you want to install in the stack, separated by a space:
neofetch vim
 INFO  Updated stack 'noble'.
jardon@lagann:~/Projects/apx$ ./apx stacks update noble
 INFO  Type a new base or confirm the current one (ubuntu:noble):

 INFO  Choose a new package manager or confirm the current one (apt):

 INFO  Do you want to update the list of packages?[y/N]
       	 - neofetch
       	 - vim
y
 INFO  Type the packages you want to install in the stack, separated by a space:
neofetch vim git
 INFO  Updated stack 'noble'.
jardon@lagann:~/Projects/apx$ ./apx stacks update noble
 INFO  Type a new base or confirm the current one (ubuntu:noble):

 INFO  Choose a new package manager or confirm the current one (apt):

 INFO  Do you want to update the list of packages?[y/N]
       	 - neofetch
       	 - vim
       	 - git
n
 INFO  Updated stack 'noble'.
jardon@lagann:~/Projects/apx$ ./apx stacks update noble
 INFO  Type a new base or confirm the current one (ubuntu:noble):

 INFO  Choose a new package manager or confirm the current one (apt):

 INFO  Do you want to update the list of packages?[y/N]
       	 - neofetch
       	 - vim
       	 - git
y
 INFO  Type the packages you want to install in the stack, separated by a space:

 INFO  Updated stack 'noble'.
jardon@lagann:~/Projects/apx$ ./apx stacks show noble
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Name            ┊ noble        ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Base            ┊ ubuntu:noble ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Packages        ┊              ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼
┊ Package manager ┊ apt          ┊
┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼┄┄┄┄┄┄┄┄┄┄┄┄┄┄┼

closes #409
closes #411

@jardon
Copy link
Member Author

jardon commented Oct 16, 2024

i will say, before this is approved and merged, the prompt doesn't make sense with the -y / --assume-yes option. it would make more sense to me if the option was something along the lines of --no-prompt

@mirkobrombin
Copy link
Member

Makes sense, I do agree with this

@jardon
Copy link
Member Author

jardon commented Oct 16, 2024

should this be changed throughout the tooling then @mirkobrombin ? or would you rather that be isolated to the update stacks command? i would prefer the consistency of changing all of them, but there may be some show stoppers I'm unaware of

@mirkobrombin
Copy link
Member

I would go the consistency way

- stacks update asks if pkgs need to be updated
- takes a space-separated list of packages to replace
@jardon jardon merged commit fba8730 into Vanilla-OS:main Oct 17, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants