swmodify - modify software catalog
swmodify [-d][-r][-p][-u][-a attribute=value][-c catalog][-f file]
[-t targetfile[-x option=value][-X options_file]
[software_selections][@ targets]
The swmodify utility provides an object and attribute update, create, and delete interface to the distribution and installed_software catalog information independent of the other utilities. When combined with swlist, there is a complete read/write interface to the installed_software and distribution catalog information.
The swmodify utility supports the following options. Where there is no description, the description inCommon Definition for Utilities applies.
- -a attribute=value
As an alternative to using a software definition file format to describe the file attributes, this option may be used to add or modify a single attribute (e.g. is_locatable). If combined with the -u option, this may be used to delete an attribute.Only one of the -c catalog and -a attribute options may be specified.
- -c catalog
This option specifies the pathname of the catalog information. If it is a file, then it will be a file using the software definition file syntax, inSoftware Definition File Format that defines the objects and attributes desired to be created or modified.If it is a directory, then it will have the exported catalog structure. For example, this could be a directory containing the output of the swlist -c command.
Only one of the -c catalog and -a attribute options may be specified.
- -d
- -f file
- -p
- -r
- -t targetfile
- -u
Deletes the objects or attributes specified.
- -x option=value
- -X option_file
The swmodify utility supports the software_selections and targets operands described inCommon Definition for Utilities .This utility need not support a target distribution in the serial format.
SeeCommon Definition for Utilities for descriptions of external influences common to all utilities.Extended Options
The swmodify utility supports the following extended options. The description in
Common Definition for Utilities applies.
- distribution_target_directory=implementation_defined_value
- installed_software_catalog=implementation_defined_value
- files=
- logfile=implementation_defined_value
- loglevel=1
- patch_commit= false
- select_local=true
- software=
- targets=
- verbose=1
Standard Input
Input Files
The source input files may be in one of the following:
- Software definition file, described in
Software Definition File Format .
- Exported catalog structure, described in
Software Definition File Format .Note that this structure may be used to describe the installed_software catalog information. There is a separate product.instance_id for each version of the product.1
SeeCommon Definition for Utilities .
SeeCommon Definition for Utilities for general information. The swmodify utility consists of three phases:
- Selection Phase
- Analysis Phase
- Execution Phase
Selection Phase
- Specifying the Source
The source selection differs from the general information in
Common Definition for Utilities in that the source is a catalog file, or set of catalog files in the software packaging layout format instead of a distribution, so there is no access control events for accessing the catalog file.If the file parsing discovers syntax errors, or missing but required attributes, then generate an event.
[SW_ERROR: SW_SOURCE_ACCESS_ERROR]
- Software Selections
If there are no software selections specified, then all software from the catalog is processed. Otherwise, each selection added to the selected software list must satisfy the following validation checks. If any of these checks result in an error, the selection is not added to the list.
- If the selection is not available from the catalog file, generate an event.
[SW_ERROR: SW_SELECTION_NOT_FOUND]
- If a unique version can not be identified, generate an event.
[SW_ERROR: SW_SELECTION_NOT_FOUND_AMBIG]
Analysis Phase
See
Common Definition for Utilities .Execution Phase
The execution phase modifies the target catalog. Certain errors can occur when modifying the catalog:
- If a file can not be found in order to look up its attributes for modifying the catalog, then generate an event.
[SW_ERROR: SW_FILE_NOT_FOUND]
- More complex rules apply when modifying attributes that inherit from the product to the fileset level. The filesets and is_locatable attributes are updated only by swpackage and swmodify. If a fileset definition is removed with swmodify, the filesets attribute is updated.
- If swmodify is used to change a fileset is_locatable attribute, then the corresponding product attribute is recalculated.
- Patches
To recover disc space, users may wish to remove versions of files saved by installation of patches after they are comfortable with the operation of a patch. To commit a patch (remove the rollback files), swmodify is invoked on the patch by setting the option patch_commit=true.
SeeCommon Definition for Utilities .
SeeCommon Definition for Utilities .
Contents | Next section | Index |