Removing Patches

Team-Fly    

Solaris™ Operating Environment Boot Camp
By David Rhodes, Dominic Butler
Table of Contents
Chapter 9.  Patching the System


Patchrm is the recommended way of removing patches from the system, although the version of backoutpatch that is supplied with the patch itself can also be used if required. Don't forget that patches cannot be backed out if the "-d" option was used to install them, since this does not save copies of the replaced software.

For example, to backout patch 105181-03, we would run the following:

 hydrogen# cd /var/sadm/patch hydrogen# patchrm 105181-03 Checking installed patches... Backing out patch 105181-03... Patch 105181-03 has been backed out. hydrogen# 

The removal process is simply a reverse of the installation process: The patch directory itself (/var/sadm/patch/<patch id>) will be removed. The save file that was created for every package affected by the patch (/var/sadm/pkg/<package>/save/<patch id>) will be extracted and the original binaries put back in place. Finally, the packages will be updated so that all traces of the patch are removed from the system.

A more complex issue is removing patches that have been made obsolete by a subsequent patch.

When patchrm runs, one of the checks it performs is to see if the patch has been made obsolete and whether it can be safely backed out or not. This means that to back out the obsoleted patch, we would need to backout the patch that has made it obsolete in the first placethe system would become very confused if it let you do otherwise!

The following example shows the type of errors you will see if you try to do this incorrectly:

 hydrogen# patchrm 105463-06 Checking installed packages and patches... This patch was obsoleted by patch 105463-07. Patches must be backed out in the reverse order in which they were installed. Patchrm exiting. hydrogen# 

In this case, we would have to backout 105463-07 first, which would then allow us to backout 105463-06.


    Team-Fly    
    Top
     



    Solaris Operating Environment Boot Camp
    Solaris Operating Environment Boot Camp
    ISBN: 0130342874
    EAN: 2147483647
    Year: 2002
    Pages: 301

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net