Packaging and Delivering Software With the Image Packaging System in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Verify the Converted Package

A common source of errors when converting SVR4 packages is mismatched attributes between directories delivered in the SVR4 package and the same directories delivered by IPS packages.

In the SVR4 package in this example, the directory action for /opt in the sample manifest has different attributes than the attributes defined for this directory by the system packages.

The Directory Actions section stated that all reference-counted actions must have the same attributes. When trying to install the version of mypkg that has been generated so far, the following error occurs:

$ pkg install mypkg
Creating Plan /
pkg install: The requested change to the system attempts to install multiple actions
for dir 'opt' with conflicting attributes:

    1 package delivers 'dir group=bin mode=0755 owner=root path=opt':
        pkg://mypublisher/mypkg@1.0,5.11-0:20111017T020042Z
    3 packages deliver 'dir group=sys mode=0755 owner=root path=opt':
        pkg://solaris/developer/build/onbld@0.5.11,5.11-0.175.0.0.0.1.0:20111012T010101Z
        pkg://solaris/system/core-os@0.5.11,5.11-0.175.0.0.0.1.0:20111012T023456Z

These packages may not be installed together. Any non-conflicting set may
be, or the packages must be corrected before they can be installed.

To catch the error before publishing the package, rather than at install time, use the pkglint(1) command with a reference repository, as shown in the following example:

$ pkglint -c ./cache -r file:///scratch/solaris-repo ./mypkg.mf.res
Lint engine setup...

PHASE                                          ITEMS
4                                          4292/4292
Starting lint run...

ERROR pkglint.dupaction007        path opt is reference-counted but has different attributes across 5
duplicates: group: bin -> mypkg group: sys -> developer/build/onbld system/core-os system/ldoms/ldomsmanager

Notice the error message about path opt having different attributes in different packages.

The extra ldomsmanager package that pkglint reports is in the reference package repository, but is not installed on the test system. The ldomsmanager package is not listed in the error reported previously by pkg install because that package is not installed.