[App argentum/ag] Check for which packages to update before asking for confirmation #11

Closed
opened 2025-05-25 15:43:07 +00:00 by Ponali · 1 comment
Ponali commented 2025-05-25 15:43:07 +00:00 (Migrated from github.com)

When trying to update every package installed on the system that needs updating, this is done through the ag update command, which currently does this:


Image

  1. Registry management
  2. Asking for confirmation
  3. Check if packages are up to date, and update those who aren't
  4. Ending message

What would be nice is to check what packages are up to date earlier in the process, before step 2.

This makes it possible to make the confirmation message only show up the packages that aren't up to date (e.g. if halyde needs a system update, only the packages halyde will show up, instead of all the packages installed in the system)

Another thing this can make possible is to stop completely afterwards when it finds out that all packages are up to date, which stops it from logging unnecessarily.


If this idea was applied, the output would be like this (if all packages are up-to-date):

Using main registry as package source
Fetching Ag registry...
argentum is up to date
edit is up to date
halyde is up to date
All packages are up to date.

Or this (if one or more packages need updating):

Using main registry as package source
Fetching Ag registry...
argentum is up to date
edit is up to date
Packages that will be updated: halyde
Would you like to proceed? [Y/n] Y
Updating halyde...
[installation process]
Update completed successfully.
Packages updated: halyde
When trying to update every package installed on the system that needs updating, this is done through the `ag update` command, which currently does this: --- ![Image](https://github.com/user-attachments/assets/3b8be2fd-5bc4-4586-ba9a-11982f9f5475) 1. Registry management 2. Asking for confirmation 3. Check if packages are up to date, and update those who aren't 4. Ending message --- What would be nice is to check what packages are up to date *earlier* in the process, before step 2. This makes it possible to make the confirmation message only show up the packages that aren't up to date (e.g. if halyde needs a system update, only the packages `halyde` will show up, instead of all the packages installed in the system) Another thing this can make possible is to stop completely afterwards when it finds out that all packages are up to date, which stops it from logging unnecessarily. --- If this idea was applied, the output would be like this (if all packages are up-to-date): ``` Using main registry as package source Fetching Ag registry... argentum is up to date edit is up to date halyde is up to date All packages are up to date. ``` Or this (if one or more packages need updating): ``` Using main registry as package source Fetching Ag registry... argentum is up to date edit is up to date Packages that will be updated: halyde Would you like to proceed? [Y/n] Y Updating halyde... [installation process] Update completed successfully. Packages updated: halyde ```
WahPlus commented 2025-06-19 06:00:37 +00:00 (Migrated from github.com)

Added in 235db61a01.

Added in 235db61a013d55f58e4087c604f565fe67047dab.
Sign in to join this conversation.