I have a set of packages (*.rpm).  For each package I can do rpm -qRp <package> to list requires, but I would like to install them (those requires) without installing the packages themselves.  The requires all live in enabled repositories.  Is there some easy way to do this without writing my own script that would parse output of rpm -qRp ... for example.I know I could do it by installing everything with requires (yum localinstall) and then uninstalling the original packages, but the problem is that my set contains packages with both dependencies and conflicts in between them.  The required packages however don't conflict.  I would have to do multiple yum localinstall <list> followed by yum remove <list> and make sure the packages in list don't conflict.I there a better way?  I would basically like something like yum-builddep, but for requires, not buildrequires.My distros are Fedora/RHEL
How to install dependencies of an rpm package without installing the package itself? (rhel/fedora)
yum;rpm
You can use the yum deplist command to generate a list of package dependencies:$ yum deplist bind  dependency: /bin/bash   provider: bash.x86_64 4.3.39-5.fc21  dependency: /bin/sh   provider: bash.x86_64 4.3.39-5.fc21  dependency: bind-libs(x86-64) = 32:9.9.6-10.P1.fc21   provider: bind-libs.x86_64 32:9.9.6-10.P1.fc21  dependency: coreutils   provider: coreutils.x86_64 8.22-22.fc21[...]Grab the provider: lines from this for a list of packages:$ yum deplist bind | awk '/provider:/ {print $2}' | sort -ubash.x86_64bind-libs.x86_64coreutils.x86_64glibc.i686glibc.x86_64grep.x86_64krb5-libs.x86_64libcap.x86_64libcom_err.x86_64libxml2.x86_64openssl-libs.x86_64shadow-utils.x86_64systemd.x86_64zlib.x86_64Send this output to yum install to install the packages:$ yum deplist bind | awk '/provider:/ {print $2}' | sort -u |  xargs yum -y install