Bug 468059

Summary: pkcon incorrect error response on update (no packages updated).
Product: [KDE Neon] neon Reporter: Joe Vaughan <joe.vaughan>
Component: Packages User EditionAssignee: Neon Bugs <neon-bugs-null>
Status: RESOLVED WAITINGFORINFO    
Severity: normal CC: joe.vaughan, jr, neon-bugs-null, sitter
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Other   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

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
Comment 1 Carlos De Maine 2025-09-20 09:35:44 UTC
Thank you for your bug report! 
However this bug report was created/provided previous to 01/01/2023 and also has not received any updates since  before 01/01/2025. 
Unfortunately KDE neon no longer provides updates for anything older than noble 24.04 based edition's.
Please upgrade to KDE neon noble and if you can reproduce the issue after upgrading to an active version, feel free to re-open this bug report.
Thanks for understanding!