If scripting yum, don’t «yum install …» multiple packages at once because yum will return successfully if any package succeeds.