Sometime, a package is renamed in new major version and so tests like
rlAssertRpm ${PACKAGE}-gui
can start to fail. One approach how to fix this is used in policycoreutils/org-selinux-dbus-interfaces/runtest.sh
rlRun "rpm -q policycoreutils-dbus || rpm -q policycoreutils-gui" 0
In PR https://src.fedoraproject.org/tests/selinux/pull-request/40 was suggested use
rlRun "rpm -qf /path/to/file" 0
which would make the test simpler.
Also I would like to consider if such test for a subpackage needs to be used as it has the same version as the main package and therefore
rlAssertRpm ${PACKAGE}
provides enough information and there's no need to check sub-package version.
Login to comment on this ticket.