yay v5.608
On yay -Syu yay shows warning about ignored packages twice.
$ yay -Syu
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Querying AUR...
:: Searching databases for updates...
:: Searching AUR for updates...
:: Checking development packages...
Warning: chromium ignoring package upgrade (64.0.3282.186-1 => 65.0.3325.181-2)
Warning: nvidia-dkms ignoring package upgrade (387.34-23 => 390.42-6)
Warning: nvidia-utils ignoring package upgrade (387.34-5 => 390.42-1)
:: Starting full system upgrade...
warning: chromium: ignoring package upgrade (64.0.3282.186-1 => 65.0.3325.181-2)
warning: nvidia-dkms: ignoring package upgrade (387.34-23 => 390.42-6)
warning: nvidia-utils: ignoring package upgrade (387.34-5 => 390.42-1)
there is nothing to do
One set is from Yay printing before the number menu. The other is from Pacman, they didn't show before because we didn't pass -Su. Ideally we would hide Pacman's messages but we can't really do that.
Hiding Yay's messages would mean the user can't be warned about ignored pkgs before the number menu.
I don't know what to do about it really, suggestions are welcome.
Does -Sup print the same warnings? If yes, you could filter out the pacman warnings from the yay warnings.
It doesn't seem to but even if it did I would prefer a more programatic way (hence the high reliance on alpm) than messily parse text from stdout.
Hiding Yay's messages would mean the user can't be warned about ignored pkgs before the number menu.
Wow I didn't even knew what was a thing, And is completely useless IMO would never bother going back to check that.
Ideally we would hide Pacman's messages but we can't really do that
Can't we really? I mean come on, how do we call it? Can't we really block it from stdout or suppress it?
Well, pacman warnings output to stderr, we can supress that fairly easily, but we would lose other warnings and errors pacman may output.
@samosaara Why would you say it's useless? I think the user should be aware of any ignored pkgs as they do not show up in the number menu, otherwise the user might just think there is no upgrade available instead. Not to mention this is also where AUR ignorepkg messages are printed too which pacman does not handle at all. Printing this message further down instead alongside pacman could work, having Yay only print AUR ignores but ideally it would be further up.
@tippl Like you said Pacman also prints other stuff to stderr so I don't think we can just suppress it. There's suppressing it and printing it back out without the ignorepkg messages but that's gonna lead to some out of sync printing.
Well, I might use that feature in a completely different way or maybe I'm missing it's point, but packages I put in ignore-pkgs are the ones I want to... ignore? But yet still, I would assume not a lot of people would go back all the way to the start of the output to check error messages...
But given the interval I generally do _my_ -Syu's I just want to upgrade them all anyway (see #170) and well, guess where I already set the packages I don't want to upgrade?
Ignore package messages are not really error messages, even if they print to stderr. The upgrade menu does exclude stuff in your ignorepkg like you'd expect but it should still warn you that it's skipping upgrades.
The main use for ignorepkg I see is to skip a broken update, so the warning allows you to see a newer version is out and you might want to try it this time. Having stuff in ignorepkg is dangerous in general because of the partial upgrade risk, the user should always be aware of them.
Hiding Yay's messages would mean the user can't be warned about ignored pkgs before the number menu.
What about hiding Yay's messages if there is no number menu?
> yay
:: Synchronizing package databases...
core is up to date
extra is up to date
community is up to date
multilib is up to date
:: Searching databases for updates...
:: Searching AUR for updates...
-> materia-gtk-theme: ignoring package upgrade (20190315-1 => 20190831-1)
-> Out Of Date AUR Packages: downgrader wd719x-firmware
:: Starting full system upgrade...
warning: materia-gtk-theme: ignoring package upgrade (20190315-1 => 20190831-1)
there is nothing to do
But why does the warning need to be redundantly printed twice? Can yay not suppress since pacman has told me already?
Most helpful comment
Ignore package messages are not really error messages, even if they print to stderr. The upgrade menu does exclude stuff in your ignorepkg like you'd expect but it should still warn you that it's skipping upgrades.
The main use for ignorepkg I see is to skip a broken update, so the warning allows you to see a newer version is out and you might want to try it this time. Having stuff in ignorepkg is dangerous in general because of the partial upgrade risk, the user should always be aware of them.