void-linux / xbps

The X Binary Package System (XBPS)
https://voidlinux.org/xbps/
Other
822 stars 124 forks source link

Print install and remove messages below transaction summary #572

Open Duncaen opened 1 year ago

Duncaen commented 1 year ago

Continuation of #421.

  1. -n does not print the messages at the moment, I don't think breaking the parseable output is a good idea.
  2. removed the callbacks for the message, since its a lot easier to just print and work with the messages from where the transaction is summarized.
  3. removed xbps_cb_messge since its pointless, we can just print the data directly.
  4. simplified the message formatting (removed the big = padding, I think it looks better without, but this is arguable).
[*] Updating repository `https://repo-de.voidlinux.org/current/x86_64-repodata' ...
[*] Updating repository `https://repo-de.voidlinux.org/current/debug/x86_64-repodata' ...
[*] Updating repository `https://repo-de.voidlinux.org/current/nonfree/x86_64-repodata' ...
[*] Updating repository `https://repo-de.voidlinux.org/current/multilib/x86_64-repodata' ...
[*] Updating repository `https://repo-de.voidlinux.org/current/multilib/nonfree/x86_64-repodata' ...

Name           Action    Version           New version            Download size
SDL_gfx        install   -                 2.0.26_2               42KB
OpenXcom       install   -                 1.0_5                  1622KB
GraphicsMagick install   -                 1.3.40_1               85KB

Size to download:             1750KB
Size required on disk:        5247KB
Space available on disk:       810GB

[*] OpenXcom install message:
OpenXcom requires a vanilla version of the original
UFO: Enemy Unknown/X-COM: UFO Defense (any edition).
See /usr/share/doc/openxcom/README.txt for details.

[*] GraphicsMagick install message:
 The libgraphicsmagick-devel package contains the GraphicsMagick PERL
 extension. To install this extension follow the instructions in:

   /usr/share/doc/GraphicsMagick/PerlMagick/README.txt

Do you want to continue? [Y/n]
classabbyamp commented 1 year ago

-n does not print the messages at the moment, I don't think breaking the parseable output is a good idea.

I like the idea of putting them on stderr, that should prevent breaking anything that doesn't 2>&1 as discussed on irc, a regular run can be done and no can be chosen if users want to see these messages, as dryrun is probably only used for update checking scripts