Operating System - HP-UX
1848559 Members
6719 Online
104033 Solutions
New Discussion

Bad patch, corrupted software

 
SOLVED
Go to solution
Eric Ladner
Trusted Contributor

Bad patch, corrupted software

Trying to commit patches on a particular machine results in this:

# swmodify -x patch_commit=true '*.*'
ERROR: Could not select the software "*.*". This software is in a
corrupt state and is not available for selection. Corrupt
software can be removed with the swremove command, or replaced
with the swcopy command.

Find the corrupt item:

swlist -l fileset -a state | grep corrupt
PHKL_23853.CORE2-KRN corrupt

Unfortunately (or fortunately), the superceding patch PHKL_29476 is also installed. If I try to swremove the corrupted patch it selects all kinds of dependant patches.

How can I get rid of that one patch without reinstalling the whole OS?

Help appreciated.
5 REPLIES 5
RAC_1
Honored Contributor

Re: Bad patch, corrupted software

swremove -p -x enforce_dependecies=false PHKL_19476

-p is for preview. If the above command runs OK, then run without -p options. Also before doing patch_comit, you may want to have a look at cleanup command.

Anil
There is no substitute to HARDWORK
Eric Ladner
Trusted Contributor

Re: Bad patch, corrupted software

Getting close.. Performing the swremove as you suggested results in this:

* Beginning Selection
* Target connection succeeded for "eseux3:/".
WARNING: The fileset "PHKL_23853.CORE2-KRN" has been automatically
deselected because one or more of the filesets in the patch
have been committed or superseded.
NOTE: One or more patch filesets were automatically selected or
deselected to maintain patch integrity. Please refer to the
swremove.log logfile for details.
ERROR: Cannot continue the "swremove" task.
* Selection had errors.
RAC_1
Honored Contributor

Re: Bad patch, corrupted software

Seems that some of the filesets have already been commited. One more thing would be checking the patch (the one that supercedes - PHKL_19476) is in configured state. If it is, then just do swremove -x enforce_dependencies=false PHKL_29476

Anil
There is no substitute to HARDWORK
Cheryl Griffin
Honored Contributor
Solution

Re: Bad patch, corrupted software

swremove will not remove a corrupted patch since a corrupted patch is not "installed" in the first place. swremoving a PHKL is dangerous.

Since the supersede is already installed/configured, simply update the INDEX with swmodify to clean up the reference to the old patch.
# swmodify -a state=configured -a patch_state=superseded
PHKL_23853.CORE2-KRN

Just keep in mind for any reason that you uninstall PHKL_29476 that PHKL_23853 will need to be installed again. But how likely is this to occur?

The other way to address this is if you wanted to learn the source of the corrupted fileset, open up a call to the response center and let them track that down.
"Downtime is a Crime."
Eric Ladner
Trusted Contributor

Re: Bad patch, corrupted software

Bingo! Thanks!

I'll keep in mind the 29476 uninstall isuue.