Artificial intelligent assistant

How are conditional "<capability> if <capability>"-type dependencies resolved by RPM? On inspecting dependencies of RHEL8 packages, I recently came across the following dependency statement: ~$ rpm -qpv --requires cockpit-ws-264.1-1.0.1.el8.x86_64.rpm post: (policycoreutils if selinux-policy-targeted) manual: (selinux-policy >= 3.14.3-95.0.1.el8 if selinux-policy-targeted) ... I understand the `or` type requirement statements, but how does the RPM package management process `if`-type dependencies? * In the above example, does it mean that `policycoreutils` is only a requirement if `selinux-policy-targeted` is already present in the target system? * Likewise, is `selinux-policy` only required if `selinux-policy-targeted` is already installed? Or is it the version requirement (`>= 3.14.3-95.0.1.el8`) that only applies if `selinux-policy-targeted` is installed (although that would deviate from the meaning in case of `or`-type requirements)?

`a if b` is equivalent to `a or not(b)`, so yes, `policycoreutils` is only a requirement if `selinux-policy-targeted` is installed.

The `if` operator applies to the whole dependency, so `selinux-policy >= 3.14.3-95.0.1.el8` is only required if `selinux-policy-targeted` is installed.

`if` in this context is a boolean operator in RPM, and is documented in the Boolean Dependencies section of the RPM Reference Manual.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 83e5c819e65287faa2484fab78b5914c