User Commands pkgrecv(1) NAME pkgrecv - image packaging system content retrieval utility SYNOPSIS /usr/bin/pkgrecv [-s src_uri] [-d (path|dest_uri)] [-kr] [-m match] (fmri|pattern) ... /usr/bin/pkgrecv [-s src_uri] -n 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 format that can easily be input to pkgsend(1) when used with the 'include' subcommand. As a result, pkgrecv(1) and pkgsend(1) can be used to conveniently modify and republish packages, perhaps by correcting file contents or providing additional package tags. OPTIONS The following options are supported: -d path_or_uri 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. If a directory path is provided, then package content will only be retrieved if it does not already exist in the target directory. If a repository URI is provided, a temporary directory will be created and all of the package data retrieved before attempting to republish it. -h Display usage message. -k Keep the retrieved package content compressed, ignored when republishing. Should not be used with pkgsend. -m match Controls matching behaviour using the following values: all-timestamps includes all matching timestamps, not just latest (implies all-versions) all-versions includes all matching versions, not just latest -n List the most recent versions of the packages available from the specified repository and exit. (All other options except -s will be ignored.) -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. EXAMPLES Example 1: List newest packages available from the repository on the system named 'test'. $ pkgrecv -s http://test -n 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. $ pkgrecv -s http://test SUNWlibC@0.5.11,5.11-0.79:20080221T125720Z 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 file:///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 file:///var/pkg/repo -r SUNWemacs 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 Everything worked. 1 Something bad happened. 2 Invalid command line options were specified. FILES ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | | |_____________________________|_____________________________| SEE ALSO pkgsend(1), attributes(5), pkg(5) NOTES The 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/