5 Making Control Script Invocations of swremove DRD-Safe
This chapter describes how to safely invoke swremove in a control script. This assumes that swremove has been determined to be the best way to remove the desired files and update the IPD.
Invoking swremove in a control script is often done in new software to obsolete old software.
5.1 How to Make Packages DRD-Safe for swremove
If either of the following is true, the invocation of swremove in your control script is already DRD- safe:
1.If the software being removed does not have any remove control scripts (checkremove, preremove, postremove, or unconfigure), and updates are only delivered as new revisions (no current patches and no chance that it will have patches), then the use of swremove on that software is
2.If the software being removed has the is_drd_safe attribute set, it is safe to swremove that software (from a DRD perspective). All
If the software being removed is not
Solution 1:
Put the swremove invocation in the update_prep control script. New for
Cautions:
•A swremove in an update_prep script will only get executed during an OE update. Therefore, software not included in OEs should not use this method.
•A swremove in an update_prep script will remove the software so that it is not there during the update operation.
When to Use this Solution:
This solution is useful for:
•OE software.
•When removing
•When the software does not need to be there during the OE update operation.
Solution 2:
Put the invocation of the swremove command in a preinstall control script and include:
Cautions:
No swremove control scripts will execute, so logic that is required for the removal of the software needs to be duplicated in the install control scripts invoking the swremove command.
When to use this solution:
This can be used for products not included in an OE that need to remove software:
•And the software being removed has no logic required for the removal
•Or the logic can be put in the preinstall from which the swremove is invoked.
Note that products not in an OE are usually updated by using swinstall rather than update_ux.