Problem
During the installation of a system supplement, I get this error:
Error: the patch could not be applied to SCO: Unix 5.0.X. component is in an invalid state.
I click on "details" and get "is corrupt".
At this point, I am unable to complete the installation or remove the portion that has been installed.
Cause
If a previous custom installation was forcefully aborted (by a
power outage, crash, SIGKILL, and so on) it can leave the software
databases in an inconsistent state. This will sometimes cause
custom to flag a component as "CORRUPT". When this happens, the
software manager will not allow any changes to that component.In many cases, the component is not actually corrupt. Therefore, to fix the problem, find the components with the CORRUPT flag set and remove that flag. If this does not allow a successful patch installation (or removal) and relink of the kernel, the system may have to be reinstalled.
Solution
Invoke the Software Manager (custom(ADM)) utility. Choose
choose Software -> Verify System -> Normal system state
(Thorough). This operation, in addition to performing an
integrity check of the system files' size, checksum, and other
attributes, automatically removes "CORRUPT" flags from the custom
database files.Alternatively, you can find out exactly which components have been flagged as "CORRUPT" and fix the occurences manually. To see which components have been flagged as "CORRUPT", type the commands:
# cd /opt/K/SCO
# for i in `ls`
do
grep CORRUPT $i/*/.softmgmt/*
doneTake note of all the files listed. Manually edit each of the files, search for the word "CORRUPT", remove it, save and exit the file.
You can now attempt to remove or apply patches to the components. Again, if the kernel does not relink cleanly after making these changes, and the component marked corrupt was "Unix", you may have to reinstall the system.