Use > Software management > Manage software packages > Deploy RPM packages > Install and uninstall package flags

Install and uninstall package flags

SA allows you to define custom command flags to be used when RPM packages are installed or uninstalled. These package flags are used by SA only when installing or uninstalling the package.

If you do not use YUM Adapter during RPM package analysis, all package flags are ignored. When using YUM Adapter, only the "--nodeps" flag is considered. For more information, see Using the native YUM to remediate RPM packages .

Note


The install or uninstall flags set on a package must be valid options for the command that will handle the install or uninstall.

The following table lists the valid flags depending on the value of Command Engine configuration parameters:

Command Engine parameters Command used Valid flags
way.remediate.yum: 0 rpm

Command options for:

  • rpm -e when the package is uninstalled
  • rpm -i or rpm -U, depending on the package install mode
way.remediate.yum: 2 yum

The current implementation does not support command flags.

Note


Having install or uninstall flags set on a package will not result in a failed job where as, these flags are ignored.

way.remediate.yum: 1 (default) yum if available else, rpm Depending on the available command, the possible package flags are for way.remediate.yum 0 or 2.
way.disable_zypper_plugin: 0 (default) (only for SLES 11 or higher) zypper

Command options appropriate for the zypper install or remove command.

Note


You cannot provide global zypper options using the flags (zypper [--global-options] <command> [--command-options])

(only for SLES 11 or higher) way.disable_zypper_plugin: 1 rpm or yum If way.disable_zypper_plugin is set to 1, SLES servers use the way.remediate.yum parameter and the same rules apply.

Irrespective of the command used to install or remove the RPM packages, SA will group similar and consecutive packages based on the order that results after dependency analysis and process them in a single native command.

Depending on the operation, the following rules determine if packages are processed together:

  • Uninstall: Consecutive packages that have the same uninstall flags and reboot option
  • Install: Consecutive packages that have the same install flags, reboot option and, the same install mode if the install command is rpm.

Note


The exception to the above rules is the “--nodeps” flag. Each package that has this flag will be processed separately.

Example: Consider, you have to install four RPM packages in the order, a.rpm, b.rpm, c.rpm and d.rpm.

If a, b and d have the same install flags, --excludedocs, the install phase can be roughly equated to the following sequence of commands for rpm based installations:

  1. “rpm -U --excludedocs a.rpm b.rpm”
  2. “rpm -U c.rpm”
  3. “rpm -U --excludedocs d.rpm”

The same above scenario applies to yum installation provided you exclude the package install flags from the following final commands:

  1. “yum install a b”
  2. “yum install c”
  3. “yum install d”

Command options set by Server Automation

When setting package install and uninstall flags, it is important to use options that do not conflict with the ones SA implicitly uses.

rpm

  • Uninstall: rpm -e with --repackage, if creation of RPM rollback point was requested and it is supported by the rpm version
  • Install: The command and implicit options depend on the package Install Mode:
    • Install: rpm -i with no custom options
    • Upgrade: rpm -U with --repackage, if creation of RPM rollback point was requested and it is supported by the rpm version

yum

SA uses custom configuration settings in the yum conf file, but does not pass command options when using yum to install or uninstall packages.

zypper

In addition to the associated conf file, SA uses the following command options when installing or uninstalling RPM packages with zypper:

  • Uninstall: --force-resolution
  • Install: -l, --force-resolution and --oldpackage (when supported by the zypper version)