Bug 468059 - pkcon incorrect error response on update (no packages updated).
Summary: pkcon incorrect error response on update (no packages updated).
Status: REPORTED
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (show other bugs)
Version: unspecified
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Neon Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-04-02 08:10 UTC by Joe Vaughan
Modified: 2023-04-02 08:13 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Vaughan 2023-04-02 08:10:55 UTC
SUMMARY
KDE Neon 'pkcon update' command returns incorrect status/error code when nothing is installed/updated. 

STEPS TO REPRODUCE
1.  sudo /usr/bin/pkcon refresh -p
2.  sudo /usr/bin/pkcon update -yp

OBSERVED RESULT
'pkcon update' returns non-zero (error code: 5) if no packages are updated. 
This is incorrect behaviour as this is not an error but a normal response.

Note: 'pkcon refresh' correctly returns 0 if no updates are applied to repository caches. 

EXPECTED RESULT

On any *NIX operating system a non-zero exit code indicates that some error occurred. 

No error has occurred in this instance, simply no updates to be applied (which isn't an error)
A successfully executing command should return status code 0. 

Therefore 'pkcon update' should return 0 as it is executing successfully even if no packages are updated. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: KDE Neon 5.27
KDE Plasma Version:  5.27.3
KDE Frameworks Version:  5.10.4.0
Qt Version: 5.15.8