Operating System - HP-UX
1850368 Members
2819 Online
104054 Solutions
New Discussion

committing and uncommitting patches on hpux 11i

 
SOLVED
Go to solution
Shivkumar
Super Advisor

committing and uncommitting patches on hpux 11i

Dear Sirs,

Is there a way for committing and uncommitting a patch on hpux 11i ?

On AIX unix a patch can be uncommitted if found unsuitable.

Thanks,
Shiv

8 REPLIES 8
Victor Fridyev
Honored Contributor

Re: committing and uncommitting patches on hpux 11i

Hi,
I f I understand you correctly, uncommit a patch in HPUX called uninstall and can be done by the command
swremove PATCH_NAME.
This fully deletes the patch from computer, so if you want to "commit" or install it, you need to have its depot and install by
swinstall patch.depot

HTH
Entities are not to be multiplied beyond necessity - RTFM
Muthukumar_5
Honored Contributor

Re: committing and uncommitting patches on hpux 11i

you can do with swmodify command.

# swmodify -x patch_commit=true PATCH

Refer more on swmodify man page.

-Muthu

Easy to suggest when don't know about the problem!
Arunvijai_4
Honored Contributor

Re: committing and uncommitting patches on hpux 11i

#swmodify should help you. Look into swmodify man page for more information.

http://docs.hp.com/en/B2355-90789/ch03s02.html

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
john kingsley
Honored Contributor

Re: committing and uncommitting patches on hpux 11i

Also take a look at the command cleanup. It will allow you to commit all patches that have been superseded at least a specific number of times. It's basically a front end to swmodify, but it's a great way to recover space on systems that have been patched a lot.
Mahesh Kumar Malik
Honored Contributor

Re: committing and uncommitting patches on hpux 11i

Hi Shiv

swmodify and swremove options can be used to uncommit the pathces if found unsuitable.

Regards
Mahesh
James R. Ferguson
Acclaimed Contributor
Solution

Re: committing and uncommitting patches on hpux 11i

Hi Shiv:

Once a patch is committed it cannot be removed. As noted, to commit you can use 'swmodify'. If a patch hasn't been committed, you can use 'swremove' to remove it.

If you have a stable system, for instance where a set of patches has been applied, there are no problems for several months, and you want to apply another, large set of patches, it is often desireable to "draw-a-line" by committing all patches to form a new baseline:

# swmodify -x patch_commit=true \*

As noted, a less drastic approach is to use 'cleanup' to leave at least one level of predecessor patches to which you can rollback.

Another advantage to committing patches is that you remove the rollback information from '/var/adm/sw' and regain considerable disk space. Balance this, however, against the ability to rollback by not having committed all members of a patch chain.

Regards!

...JRF...

Shivkumar
Super Advisor

Re: committing and uncommitting patches on hpux 11i

James; Do you suggest that we should apply patches in uncommited mode first ?
Actually, what is the command to apply patch in uncommitted mode ?

Thanks,
Shiv
James R. Ferguson
Acclaimed Contributor

Re: committing and uncommitting patches on hpux 11i

Hi Shiv:

Patches are normally applied but not committed unless you explicitly act to commit them as I noted above. That is, a roll-back image, which is a copy of any previous patch or software, is kept in the '/var/adm/sw/save' directory).

If you look at the text notes of any patch in the ITRC Patch Database, you will see something like this, for example:

/*

Run swinstall to install the patch:

swinstall -x autoreboot=true -x patch_match_target=true \
-s /tmp/PHCO_32438.depot

By default swinstall will archive the original software in /var/adm/sw/save/PHCO_32438. If you do not wish to retain a copy of the original software, include the patch_save_files option in the swinstall command above:

-x patch_save_files=false

WARNING: If patch_save_files is false when a patch is installed, the patch cannot be deinstalled. Please be careful when using this feature.

*/

You can read more about patch 'state' here:

http://www.docs.hp.com/en/5991-2722/5991-2722.pdf

Regards!

...JRF...