You can add publishers to a repository. For example, you could maintain solaris, ha-cluster, and solarisstudio packages in one repository.
If you add custom packages, publish those packages under a custom publisher name. Do not publish custom packages as an existing publisher such as solaris. If you publish packages that do not have a publisher specified, those packages will be added to the default publisher for the repository. Publish custom packages to a test repository with the correct default publisher. Then use the pkgrecv command to add those packages and their publisher information to your production repository. See Publish the Package in Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.2 for instructions.
In the following example, the isvpub publisher data and all of the packages from the ISVproducts.p5p package archive are added to the local repository. A package archive is a file that contains publisher information and one or more packages provided by that publisher. See Deliver as a Package Archive File in Packaging and Delivering Software With the Image Packaging System in Oracle Solaris 11.2 . Most pkgrepo operations are not available for package archives. A package archive contains packages but does not contain repository configuration. However, the pkgrepo list and pkgrepo contents commands work with package archives. The pkgrepo contents command is discussed in Examining Packages In Your Repository.
In the pkgrepo list output, the publisher is shown because it is not the publisher that is highest ranked in search order in this image.
$ pkgrepo -s /tmp/ISVproducts.p5p list PUBLISHER NAME O VERSION isvpub isvtool 1.1,5.11:20131120T021902Z isvpub isvtool 1.0,5.11:20131120T010105Z
The following pkgrecv command retrieves all packages from the source repository. If you list names of packages to retrieve, or you specify a pattern other than '*', you should specify the -r option to ensure you retrieve all necessary dependency packages.
$ pkgrecv -s /tmp/ISVproducts.p5p -d /export/IPSpkgrepos/Solaris '*' Processing packages for publisher isvpub ... Retrieving and evaluating 2 package(s)... PROCESS ITEMS GET (MB) SEND (MB) Completed 2/2 0.0/0.0 0.0/0
After you change the content of a repository, refresh the repository and restart any package depot server service instance configured for this repository.
$ pkgrepo -s /export/IPSpkgrepos/Solaris refresh -p isvpub Initiating repository refresh. $ svcadm refresh pkg/server:solaris $ svcadm restart pkg/server:solaris
The following pkgrepo info command shows one package because the two packages that were retrieved are different versions of the same package. The pkgrepo list command shows both packages.
$ pkgrepo -s /export/IPSpkgrepos/Solaris info PUBLISHER PACKAGES STATUS UPDATED solaris 4768 online 2014-01-02T19:19:06.983979Z isvpub 1 online 2014-03-20T23:24:37.196773Z $ pkgrepo -s /export/IPSpkgrepos/Solaris list -p isvpub PUBLISHER NAME O VERSION isvpub isvtool 1.1,5.11:20131120T021902Z isvpub isvtool 1.0,5.11:20131120T010105Z
Add the new repository location for the isvpub publisher by using the pkg set-publisher command.
If this repository is available from an HTTP interface and you use a browser to view the content of this repository, you can view this new package by specifying the publisher in the location. For example, you can specify http://localhost:81/isvpub/.