Bug 468059 - pkcon incorrect error response on update (no packages updated).
Summary: pkcon incorrect error response on update (no packages updated).
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: neon
Classification: KDE Neon
Component: Packages User Edition (other bugs)
Version First Reported In: 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: 2025-09-20 09:35 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


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
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!