Previous section.

Systems Management: Distributed Software Administration
Copyright © 1997 The Open Group

NAME

swlist - List software

SYNOPSIS

No additional rationale is required under this heading.

DESCRIPTION

The swlist utility may be used to perform the following tasks:

It provides the means to read the catalog information. For installed_software, this information is stored in an implementation specific fashion. A read interface is needed to support portability between conforming implementations. In particular, an implementation may need to export current data for import into a new implementation.

A read interface should also support the objective of distributed administration by providing a standard interface for output of information about software being managed by any conforming implementation.

Finally, a vendor integrating into the standard software management environment needs a standard way to query the catalog about itself as well as other products, both from vendor-supplied scripts and the product execution itself.

The swlist command line interface meets these key objectives. There could be an additional requirement that a standard programmatic interface be defined for access to the catalog by related management applications, as well as software product executables. This objective can only be (reasonably) met by defining language specific or language independent interfaces, as well as the data structures needed to represent at least single software attributes. Alternatively, a standard object-oriented interface for retrieving objects and attributes from a standard administration catalog could be defined through which this Software Administration specification could support its defined software objects. This is not an objective of this Software Administration specification at this time.

Discussed, but not included, is a possible vendor extension for swlist to provide an interface into displaying the attributes of the defaults files for the various utilities. The syntax for listing an attribute would be

swlist -l <utility> -a <option>

OPTIONS

The output is the parsable form as it is in a known format, with attribute (keyword value) pairs. It is analogous to a POSIX.2 ls long listing. The undefined format should include at least the object tag attribute (for product, subproduct, fileset, control_file) or path attribute (for files).

Management of the host object (which contains the attributes for lists of distributions and installed_software objects) is undefined within this Software Administration specification. Still, and can be used to get lists of distributions and installed_software objects respectively on the host.

To list the files in a fileset object, then no option is needed. But, to list both the files and control_files, then both and are needed. Likewise, and can be used together to list both the subproduct and fileset objects contained in a product.

If the -v is not specified, a typical implementation might list all attributes specified on one line per object.

Both the -l and -a options can be used to obtain lists of contained objects where -l returns available or currently installed objects and -a returns all objects defined in the original distribution. Only the -l option can be used to obtain attributes of those contained objects. Note that the keyword for -a attribute is just the plural of the keyword for -l level For example:

swlist -a control_files <fileset>

lists the defined control_file tags for the fileset, while:

swlist -l control_file -a result <fileset>

lists the result attribute of each control_file object in the fileset.

Note that the -l option could be extended to one more level, host, that would list all distributions on the host.

Both the targets operand and the [-s source] option were considered for administrator convenience, but the latter was removed from this Software Administration specification. The former is used to list software available from a distribution that is being used as a target. The latter was possible for listing software available from a distribution that is being used as a source with other commands; however, it can also be accessed as a target.

In addition to all attribute names defined in Software Administration specification, the following three additional items are supported by the -a attribute option: software_spec, mod_date and create_date.

The software_spec item is supported in order for users of swlist to generate the exact conformant software_spec needed to uniquely identify a software object. This was included because creating a software_spec from the correct version distinguishing attributes is moderately difficult.

The mod_date and create_date items are intended for use by administrators to easily see when the software object was first installed or available, or when it was last modified. The format of these strings should be time zone and locale dependent, such as:

Jan 14 1993 4:30 PM

In addition, software_spec , date, and create_date should not be stored in any software definition file. If they are found there, they will be ignored. Whether they are implemented as attributes, methods on existing attributes, or some other method, it does not matter. They may be specified like any other attributes for administrator convenience.

OPERANDS

No additional rationale is required under this heading.

EXTERNAL INFLUENCES

The one_liner extended option is used to create default output for the novice user, as well as for the experienced user. A typical implementation might list all attributes in the one_liner on one line per object. The tag and path attribute behavior also applies if the one_liner is undefined or set to no attributes. If the tag and path are really not desired in the output, then the -a attribute option may be used.

More advanced support for formatting output, such as a format option using printf() syntax, was discussed, but it was deemed that this is a reasonable area for vendor extension, and not necessary for this Software Administration specification given the -v parsable format.

EXTERNAL EFFECTS

No additional rationale is required under this heading.

EXTENDED DESCRIPTION

Update Capabilities
When a product is partially updated (one or more, but not all, filesets have been updated by filesets from a different version of the product), then two product versions exist on the system, each partially complete. The swlist utility will show both.

Example:
swlist -l fileset -x one_liner="revision title" SW-DIST # SW-DIST B.10.10 HP-UX Software Distributor SW-DIST.SD-AGENT B.10.10 HP-UX Software Distributor agent # SW-DIST B.10.20 HP-UX Software Distributor SW-DIST.SD-CMDS B.10.20 HP-UX Software Distributor commands

Once the product is completely updated, only the newer version is listed.

Example:
swlist -l fileset -a revision -a title SW-DIST # SW-DIST B.10.20 HP-UX Software Distributor SW-DIST.SD-AGENT B.10.20 HP-UX Software Distributor agent SW-DIST.SD-CMDS B.10.20 HP-UX Software Distributor commands

Patch
Filtering according to category will be supported. The use of category filtering will allow easy selection of all patch software objects. Software objects with the is_patch attribute set to true have the built-in category of "patch". The category "patch" is reserved for this use.

This can be used to list available patches, and patches with a certain name.

The fileset attribute applied_patches is automatically updated to include any patches that have been installed and applied to it, due to it being in the patch fileset's ancestor list. This can include patches that perhaps do not share the same product tag as the base filesets (ancestors) they patch.

Any fileset that has been patched has an applied_patches attribute listing all of the patches that have been applied to it.

Listing what products and filesets a patch applies to can be generated by listing the ancestor attribute. A list of what patches a patch superseded can be generated by listing the supersedes attribute.

EXAMPLES

List all distributions on a host:
swlist -d -l distribution @ host

List all products in the default distribution:

swlist -d

List all files in an installed fileset:

swlist Product.Fileset swlist -a files Product.Fileset swlist -l file Product.Fileset

List all files and control_files in a fileset, in INFO file format:

swlist -v -l file -l control_file Product.Fileset

List the states of control_files in product:

swlist -a state -l control_file Product

List the definition of the contents of a bundle in the default distribution:

swlist -d -a products -a bundles Bundle

Dump an installed_software catalog:

swlist -l file -l control_file -l bundle -l subproduct -c exported_catalog

List a fileset software object into the software definition file format:

swlist -l fileset -v -c exported_catalog Product.Fileset

List a product's copyright:

swlist -a copyright Product

List the values of all product and fileset software: tag, revision, and title attributes from the default distribution:

swlist -d -l fileset -x one_liner='tag revision title'

Example of listing sparse filesets:

swlist -l fileset -a revision -a is_sparse PRODUCT,r=10.0 # PRODUCT 10.0 PRODUCT.FILESET 1.0 false PRODUCT.FILESET 2.0 true

Examples of patch listing:

Example:
swlist -d -l product -l bundle -a software_spec *,c=patch PH003-23245,r=1.0,a=,v= PH056-45545,r=1.0,a=,v= X11,r=5.00.01,a=FLUX,v=FLB

This lists all products and bundles in a depot that have the is_patch attribute set to true.

Example:
swlist -l fileset -a software_spec X11,c=patch X11.Runtime,r=5.00.01,a=FLUX,v=FLB,fr=1.0.1

This lists all patch filesets in the product X11 (but only patches that have the product tag X11).

Example of listing applied patches:

Example:
swlist -l fileset -a applied_patches X11 X11.Runtime X11.Runtime,r=1.0,a=FLUX,v=FLB,fr=1.0.1 X11.Manuals X11.Libraries PH056-45545.PH056-45545,r=1.0,a=FLUX,v=FLB

This shows patches with matching and non-matching tags.

Example of listing patch categories:

Example:
swlist -d -l category -s /CD

critical
Patches that fix system hangs or data corruption.

S747_upgrade
Patches that are needed to upgrade to an S747.

security_patch
Patches affecting system security.

The swlist command lists the categories defined in the depot mounted at /CD. The attributes of the category objects are controlled by the POSIX one_liner default (in this case set to "tag title").

Example:
swlist -a description -l category critical

List a particular attribute of a category object identifed by the tag "critical".

Note:
1387.2 could also use a -l vendor.

EXIT STATUS

No additional rationale is required under this heading.

CONSEQUENCES OF ERRORS

No additional rationale is required under this heading.

Why not acquire a nicely bound hard copy?
Click here to return to the publication details or order a copy of this publication.

Contents Next section Index