FS#62336 - [pacman-contrib] When there are updates available, checkupdates should exit non-zero
Attached to Project:
Community Packages
Opened by Jonathan DeMasi (jrdemasi) - Sunday, 14 April 2019, 03:02 GMT
Last edited by Daniel M. Capella (polyzen) - Friday, 26 April 2019, 20:24 GMT
Opened by Jonathan DeMasi (jrdemasi) - Sunday, 14 April 2019, 03:02 GMT
Last edited by Daniel M. Capella (polyzen) - Friday, 26 April 2019, 20:24 GMT
|
Details
Description:
On other distros, such as RHEL/CentOS/Fedora, there is a function to check for package updates. (e.g. yum check-updates). Yum will exit with a status of 100 if there are updates available, and 0 if there are none. Having similar functionality in pacman-contrib's checkupdates would be useful for scripting and determining if a system is up-to-date. Steps to reproduce: Ensure you have pacman-contrib installed -- pacman -S pacman-contrib Run checkupdates echo $? The output to the above will always be 0 assuming the script doesn't encounter any errors - this makes sense, but having a set exit status if there ARE updates would mean you could programmatically run checkupdates and generate reports, send emails, etc. |
This task depends upon
Closed by Daniel M. Capella (polyzen)
Friday, 26 April 2019, 20:24 GMT
Reason for closing: Fixed
Additional comments about closing: Resolved in https://git.archlinux.org/pacman-contrib .git/commit/?id=ab696663975c433c451d9927 f907a67a14441263
Friday, 26 April 2019, 20:24 GMT
Reason for closing: Fixed
Additional comments about closing: Resolved in https://git.archlinux.org/pacman-contrib .git/commit/?id=ab696663975c433c451d9927 f907a67a14441263
return ${PIPESTATUS[0]}