As versões modernas do yum (yum-3.4.3-133.el7 +, ticket ) fornecem dois opções que devem ajudar neste caso de uso:
skip_missing_names_on_install If set to False, 'yum install'
will fail if it can't find any of the provided names (package,
group, rpm file). Boolean (1, 0, True, False, yes, no).
Defaults to True.
skip_missing_names_on_update If set to False, 'yum update'
will fail if it can't find any of the provided names (package,
group, rpm file). It will also fail if the provided name is a
package which is available, but not installed. Boolean (1, 0,
True, False, yes, no). Defaults to True.
Fonte: páginas do manual
Uso:
yum --setopt=skip_missing_names_on_install=False <commands-here>