Description of problem: API Documentation for system.isNvreInstalled says: Returns: * int - 1 on success, exception thrown otherwise. That is incorrect, it does not throw an exception, instead 0 is returned if the given package is not installed. Version-Release number of selected component (if applicable): spacewalk-java-1.2.39-35.1.el5sat How reproducible: call system.isNvreInstalled with a package that is not installed on the target system. It will return 0. Look at https://your.rhn.sat/rhn/apidoc/handlers/SystemHandler.jsp#isNvreInstalled Steps to Reproduce: 1. call system.isNvreInstalled 2. Look at API Documentation for system.isNvreInstalled 3. Actual results: Returns: * int - 1 on success, exception thrown otherwise. Expected results: Returns: * int - 1 if the package is installed, 0 otherwise. Additional info: Alternatively, the API could be changed to behave as documented. I think the documentation should be corrected. An exception should only be thrown if an error occured so that it could not be determined if the package is installed or not.
Here is an example: >>> r = client.system.isNvreInstalled(session, 1000011088, "rpm-python", "4.4.2.3","18.el5") >>> r 1 >>> r = client.system.isNvreInstalled(session, 1000011088, "rpm-python", "4.4.5.3","18.el5") >>> r 0
NoSuchSystemException is thrown, when you specify non-existing serverId. But right, information about 0 value returned is missing.
This is not yet correctly documented in Satellite 5.4.1 and also in Spacewalk 1.7 (don't know about 1.8).
committed changes of documentation to spacewalk.git: 63a8f286ff671908440b21473a3112fdd534474f
Satellite 5.6 has been released. This bug was tracked under the release. This bug was either VERIFIED or RELEASE_PENDING (re-verified prior shortly before release). Moving to CLOSED CURRENT_RELEASE. Text from Upgrade Erratum follows: Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2013-1395.html