Go to main content

Copying and Creating Package Repositories in Oracle® Solaris 11.3

Exit Print View

Updated: September 2018
 
 

How to Update a Cloned Local IPS Package Repository

This procedure assumes that you are updating duplicate repositories that already exist. If you are creating new duplicate repositories, use the How to Clone a Local IPS Package Repository procedure.

This procedure is very similar to the How to Update a Local IPS Package Repository procedure except that this procedure copies the source repository exactly by using the --clone option. The steps in this procedure are very abbreviated. For detail, see How to Update a Local IPS Package Repository.

Before You Begin

Make sure that the repository that will be the source for the clone repositories is current. If necessary, use the How to Update a Local IPS Package Repository procedure to update the source repository before you update the clone repositories.

  1. Copy the destination repository.

    Make sure you have a current snapshot of the destination repository. Make a ZFS clone of this snapshot.

    This step is especially important when making a clone, because the clone (--clone) operation leaves the destination repository altered if an error occurs.

  2. Update the copy of the destination repository.

    Use the pkgrecv command to duplicate the updated master repository to the copy of the destination repository.

    $ pkgrecv -s /net/host1/var/share/pkgrepos/solaris \
    -d /net/host2/var/share/pkgrepos/solaris_tmp --clone -p '*'

    The -p option clones content from all publishers, in case content was added from a new publisher when the source repository was updated. See the pkgrecv(1) man page for information about the --clone option.

    If an error occurs, roll back to the most recent repository snapshot.

    If the pkgrecv operation is interrupted, follow the instructions in Resuming an Interrupted Package Receive.

  3. Replace the working destination repository with the updated clone.
  4. Verify the updated repository.

    Use the pkgrepo verify command to verify the updated destination repository.

  5. Snapshot the newly updated repository.
  6. Restart the SMF service.

    If you are providing the repository through an HTTP interface, restart the SMF service. Be sure to specify the appropriate service instance when you restart the service.

  7. Remove the old repository.

    When you are satisfied that your updated repository is working correctly, remove the old repository.

See Also

If you are providing the repository through an HTTP interface, see the following related documentation: