Excerpts from Eli Schwartz's message of October 10, 2019 23:14:
On 10/10/19 4:58 PM, Johannes Löthberg wrote:
Excerpts from Jeffrey Serio's message of October 10, 2019 22:37:
Hello all. I'm just curious what is going on with the checkupdates script. It returns exit status 1. Anyone else have this issue? Or, is this the intended behavior for when there are no updates?
Hey,
Somehow it had completely slipped my mind that ab69666 (checkupdates: add option to download updates using -Swu, 2019-04-24) exits with 1 if there are no updates.
The question is whether we should treat updates and no updates the same and exit with 0, or if we want different exit statuses for either case..
I think it's reasonable to ask for different return codes depending on whether pacman -Qu failed or whether pacman -Sy failed.
The question is whether we should stick with exit 1 for compatibility with pacman -Qu, or have it exit 2.
-Qu being empty isn't really a *failure*, so I think it makes more sense to use 1 for actual failures, and 2 for -Qu being empty. Though on the other hand, I also think it makes more sense for checkupdates exiting with 0 when there are no updates, but that doesn't matter as much. -- Sincerely, Johannes Löthberg :: SA0DEM