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

Exit Print View

Updated: July 2014
 
 

origin Dependency

The origin dependency exists to resolve upgrade issues that require intermediate transitions. The default behavior is to specify the minimum version of a package (if installed) that must be present on the image being updated. If the value of the root-image attribute is true, the package must be present on the image rooted at / in order to install this package.

For example, a typical use might be a database package version 5 that supports upgrade from version 3 or greater, but not earlier versions. In this case, version 5 would have an origin dependency on itself at version 3. Thus, if version 5 was being freshly installed, installation would proceed. However, if version 1 of the package was installed, the package could not be upgraded directly to version 5. In this case, pkg update database-package would not select version 5 but instead would select version 3 as the latest possible version to which to upgrade.

If the value of the root-image attribute is true, the dependency target must be at the specified version or greater if it is present in the running system, rather than on the image being updated. This form of the origin dependency is generally used for operating system issues such as dependencies on boot block installers.

An example origin dependency is:

depend fmri=pkg:/database/mydb@3.0 type=origin

Device Driver with Manually Maintained Firmware

Device drivers should manage their own firmware: Firmware should be delivered in the driver package and should be updated when the administrator uses the pkg update command to update the driver. See Firmware Compatibility in Writing Device Drivers for Oracle Solaris 11.2 for driver design information. Drivers also should continue to function with downrev firmware, even if some new features might not be supported.

A few drivers require manual intervention to update the device firmware, separate from running pkg update to update the driver. A few of these drivers with manually maintained firmware are not compatible with all older versions of the firmware and have a minimum version requirement for the firmware. The origin dependency can be used to prevent installation of a driver that is not compatible with the currently installed firmware, which can prevent a system upgrade that results in a system that is not fully functioning.

The origin dependency can be used to specify the minimum version of the device firmware that is compatible with the version of the driver that is being delivered. If the value of the root-image attribute is true and the value of the fmri attribute starts with pkg:/feature/firmware/, the remainder of the fmri value is treated as a command in /usr/lib/fwenum that evaluates the firmware dependency. When an administrator attempts to update a package that specifies this type of dependency and the firmware enumerator determines that the firmware dependency is not satisfied, an error message is displayed and the update is not performed: the system is not changed. The error message shows the firmware version that is required for devices managed by this driver. Once the firmware has been updated, the administrator can attempt the pkg update again.

The following is an example of an origin dependency with a minimum firmware version requirement:

depend fmri=pkg:/feature/firmware/mpt_sas minimum-version=1.0.0.0 \
root-image=true type=origin variant.opensolaris.zone=global

The pkg client invokes the firmware enumerator as shown in the following example:

/usr/lib/fwenum/mpt_sas minimum-version=1.0.0.0

The following sample message from the pkg client tells the administrator that two devices that are managed by the mpt_sas driver have firmware whose version does not satisfy the minimum requirement. The message also states that minimum required firmware version.

There are 2 instances of downrev firmware for the mpt_sas devices present on this system;
upgrade each to version 1.0.0.0 or greater to permit installation of this version of Solaris.

If a driver supports the same device from multiple vendors, the dependency can specify a vendor attribute in addition to the minimum-version attribute.