In general, packages should not deliver multiple actions with the same path. The following actions are the only exceptions:
Directories, links, and hardlinks that have identical attribute values
Mediated links and hardlinks
For the best user experience, avoid installation and update errors by using the pkglint utility to check for conflicts. See Verify the Package and the pkglint(1) man page for more information about pkglint.
When a single package must deliver different versions of the same content to the same path, use a variant to allow the administrator to choose between the different versions of content to install. See Mutually Exclusive Software Components and the pkg(7) man page for more information.
When multiple packages (not two versions of the same package) must deliver different versions of the same content to the same path, use a mediated link to enable the administrator to choose between different versions of that content. Conflicting content must be installed in different parent directories, and a link created in the target location that points to each version of the content. The administrator can switch between different content by using the pkg set-mediator command to change the target of the link. See Delivering Multiple Implementations of an Application for a description of how to mediate conflicting package content.
If two different packages deliver some of the same content but only one of the packages should be installed, make sure the packages have different names. If publisher example.com delivers some of the same content as publisher solaris, the end user might be able to avoid conflicts by specifying the full package name, including publisher, in the installation command. However, problems could still arise with dependencies. The fmri attribute of a depend action specifies the full package name except for the publisher. The following dependency matches both pkg://solaris/cat/subcat/tool and pkg://example.com/cat/subcat/tool:
depend fmri=pkg:/cat/subcat/tool type=require
To differentiate these dependencies to install the correct package, change the package name. The following suggestions change the package name but still keep the name tool:
pkg://example.com/cat/subcat/example.com/tool pkg://example.com/cat/subcat/example.com,tool pkg://example.com/cat/subcat/vendor/example.com/tool