Previous section.

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


swcopy - copy distribution


swcopy [-p][-f file][-s source][-t targetfile][-x option=value]
-X options_file][software_selections][@ targets]


The swcopy utility copies or merges software from any source distribution to a target distribution on the local host, or to the targets specified on the command line. The distribution can then be accessed by the swinstall utility as a source.


The swcopy utility supports the following options. Where there is no description, the description in Common Definition for Utilities applies.

-f file


-s source

-t targetfile

-x option=value

-X options_file


The swcopy utility supports the software_selections and targets operands described in Common Definition for Utilities .

Whether data on an existing target distribution in serial format is overwritten or merged is implementation defined.


See Common Definition for Utilities for descriptions of external influences common to all utilities.

Extended Options

The swcopy utility supports the following extended options. The description in Common Definition for Utilities applies.






















See Common Definition for Utilities .


See Common Definition for Utilities for general information. There are three key phases in the copy utility:

  1. Selection phase

  2. Analysis phase

  3. Execution phase

Selection Phase

If a software selection has dependency specifications on other software and autoselect_dependencies=true, this software is automatically selected using the method described in Software Specification and Logic . The resulting selection must be unambiguous. This automatically selected software is then copied along with the rest of the selected software. If autoselect_dependencies=if_needed, then automatically selected software is only copied if the dependency is not already met.

The swcopy utility supports corequisite and prerequisite dependencies for autoselection, but treats them equally (no ordering considerations like swinstall). The swcopy utility ignores exrequisites.

For swcopy each selection added to the selected software list satisfies the following validation checks. If any of these checks result in an error, the selection is not added to the list.

No compatibility filtering is done for swcopy.

In general, usage of the patch_filter and patch_match_target options for copying patches corresponds exactly to their use in swinstall. One difference is that the "highest superseding" rule is not used; instead, all levels of patches are included.

Analysis Phase

The target role uses the file size information obtained from the source to determine whether or not the copy utility proceeds on the given target. If any target fails any of the analysis operations, what software is attempted to be copied is determined by the implementation defined error handling procedures.

The target role checks the following requirements:

How disk space analysis is implemented is undefined. However an implementation must account at least for the sizes of the files and control_files being copied.

Execution Phase

As the result of a swcopy, products and bundles, if specified, are copied to the target, which is a distribution software object.

When creating serial distributions, an implementation must support one or both of the POSIX.1 extended cpio or extended tar archive formats. Whether an implementation supports writing both archive formats or only one, and which of the formats is supported if only one, is implementation defined.

The relationship between the fileset loading and state transitions for swcopy is shown in the following list.

Copy each product:

  1. Create the distribution catalog information for the product and its contained subproducts.

  2. Copy each fileset in the product:

    1. Create the distribution catalog information for the fileset, setting the state to transient .

    2. Load the files for the fileset.

    3. Update the state of the fileset to available .

Copy each bundle:

  1. Create the distribution catalog information for the bundle.

A depot update is defined as "copying or packaging a higher revision of a fileset than one that currently exists within a particular product revision in a depot".

When the new revision of the fileset has completed the copy, and the state of the fileset is set to available, also remove the catalog information for the existing fileset (or set the state of the existing fileset to removed), and remove any files that were contained in the old fileset but are not contained in the new fileset. See step 2c above.

For disk space analysis during a copy update, ensure that files that will be removed from a depot during update are accounted for, in addition to the normal analysis for new files and files being replaced.


See Common Definition for Utilities .


See Common Definition for Utilities .

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