Not able to remove custom package from RHN Custom Channel
Environment
- Red Hat Satellite (RHS) 5
Issue
- Internal Server Error is displayed when a package is requested to be deleted in the Satellite Web-UI
-
spacecmd also is not able to remove the package
spacecmd {SSM:0}> package_search mycustompackage-1.0-1.el5.x86_64 spacecmd {SSM:0}> package_remove mycustompackage-1.0-1.el5.x86_64 Packages -------- mycustompackage-1.0-1.el5.x86_64 Remove these packages [y/N]: y ERROR: Failed to remove package ID 1234567 -
There are errors printed in
Catalina.outshowingORA-02292: integrity constraint (RHNSAT.RHN_ERR_PKGTMP_PID_FK) violated - child record found
Resolution
- Remove the package from the linked errata(s) to be able to delete the package
Root Cause
- The package can't be deleted as it belongs to an Errata
Diagnostic Steps
Try to remove a package via the following different ways:
- Remove a package that:
- does not belong to any Errata via GUI.
- does not belong to any Errata via spacecmd
- belongs to Errata via GUI
- belongs to Errata via spacecmd
- The first two should succeed, the second two should fail with the above mentioned errors.
-
Check the database for the package-id that did fail:
# spacewalk-sql -i SQL> select * from rhnerratapackagetmp where package_id = 178146; SQL> select * from rhnerratapackage where package_id = 178146; -
This should return some lines with errata ids the package is linked to.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
