User Commands pkgrecv(1)
NAME
pkgrecv - image packaging system content retrieval utility
SYNOPSIS
/usr/bin/pkgrecv [-s src_uri] [-d (path|dest_uri)] [-c cache_dir]
[-kr] [-m match] [-n] [--raw] [--key keyfile --cert certfile]
(fmri|pattern) .../usr/bin/pkgrecv [-s src_uri] --newest
DESCRIPTION
pkgrecv allows the user to retrieve the contents of a package
from a pkg(5) repository. With the default options, the contents are retrieved in a repository format suitable for use with pkg.depotd(1M). OPTIONS The following options are supported:-c cache_dir The path to a directory that will be used to cache
downloaded content. If one is not supplied, the client will automatically pick a cache directory. In the case where a download is interrupted, and a cache directory was automatically chosen, use this option to resume the download.-d path_or_uri The filesystem path or URI of the target repository to
republish packages to. If not provided, the default value is the current working directory. The target must already exist. New repositories can be created using pkgrepo(1).-h Display usage message.
-k Keep the retrieved package content compressed, ignored
when republishing. Should not be used with pkgsend(1).-m match Controls matching behavior using the following values:
all-timestamps
includes all matching timestamps, not justlatest (implies all-versions)
all-versions
includes all matching versions, not just latest-n Perform a trial run with no changes made.
-r Recursively retrieves all dependencies for the provided
list of packages.-s src_repo_uri A URI representing the location of a pkg(5) repository
from which to receive package data.--cert file Specify a client SSL certificate file to use for package
retrieval from an HTTPS repository.--key file Specify a client SSL key file to use for package retrieval
from an HTTPS repository.--newest List the most recent versions of the packages available
from the specified repository and exit. (All otheroptions except -s will be ignored.)
--raw Retrieve and store the raw package data in a set of
directory structures by stem and version at the locationspecified by -d. May only be used with filesystem-
based destinations. This can be used with pkgsend(1) include to conveniently modify and republish packages, perhaps by correcting file contents or providing additional package metadata.EXAMPLES
Example 1: List newest packages available from the repository on the system named 'test'.$ pkgrecv -s http://test --newest
pkg:/SUNWlibC@0.5.11,5.11-0.79:20080221T125720Z
pkg:/SUNWfreetype2@0.5.11,5.11-0.79:20080221T123955Z
pkg:/SUNWlibm@0.5.11,5.11-0.79:20080221T125728Z
pkg:/SUNWliboil@0.5.11,5.11-0.79:20080221T125730Z
Example 2: Receive the SUNWlibC, SUNWfreetype, and SUNWlibm packages from example 1 in a format suitable for use with pkgsend(1) include.$ pkgrecv -s http://test SUNWlibC@0.5.11,5.11-0.79:20080221T125720Z \
--raw
SUNWfreetype2@0.5.11,5.11-0.79:20080221T123955Z
SUNWlibm@0.5.11,5.11-0.79:20080221T125728Z
$ ls -d SUNW*
SUNWfreetype2 SUNWlibC SUNWlibm Example 3: Receive the package "SUNWvim" and all of its dependencies from the system named 'test'.$ pkgrecv -s http://test -r SUNWvim
Example 4: Receive all versions of the package "SUNWvim" from the system named 'test'.$ pkgrecv -s http://test -m all-versions SUNWvim
Example 5: Receive all versions of the package "SUNWvim" from the system named 'test' and republish it to a local repository.$ pkgrecv -s http://test -d /local/repo SUNWvim
Example 6: Receive all versions of the package "SUNWzlib" from the system named 'test' and republish it to a remote repository on the system named 'remote'.$ pkgrecv -s http://test -d http://remote:10000 SUNWzlib
Example 7: Receive the package "SUNWemacs" and all of its dependencies from the repository located at '/var/pkg/repo'.$ pkgrecv -s /var/pkg/repo -r SUNWemacs
Example 8: Receive all packages that do not already exist from the repository located at 'http://example.com:10000':$ pkgrecv -s http://example.com:10000 -d /my/pkg/repo '*'
ENVIRONMENT VARIABLES The following environment variables are supported:PKG_DEST The path of a directory to save the retrieved
package to, or the URI of a repository to republish it to. If not provided, the default value is the current working directory.PKG_SRC A URI representing the location of a pkg(5)
repository to retrieve package data from. EXIT STATUS The following exit values are returned: 0 Command succeeded. 1 An error occurred. 2 Invalid command line options were specified. 3 Multiple operations were requested, but only some of them succeeded.ATTRIBUTES
See attributes(5) for descriptions of the following attributes:____________________________________________________________
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
|_____________________________|_____________________________|
| Availability | ||_____________________________|_____________________________|
SEE ALSO
pkgrepo(1), pkgsend(1), attributes(5), pkg(5) NOTESThe image packaging system is an under-development feature.
Command names, invocation, formats, and operations are all subject to change. Development is hosted in the OpenSolaris community at http://opensolaris.org/os/project/pkg/