To get a list of packages and programs that are required for instalation of some RPM package, execute the following:
rpm -qpR package.rpm
The "-R" parameter stands for "Requires". And here is an example:
# rpm -qpR vnc-server-4.0-0.beta4.3.2.i386.rpm /etc/init.d /sbin/chkconfig /usr/bin/mcookie /usr/bin/perl /usr/bin/python bash >= 2.0 libz.so.1 rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1 ...
If you like to query a installed package, Kernel package as an example, then do the following:
rpm -qR kernel
Here's the output of the example:
# rpm -qR kernel rpmlib(VersionedDependencies) <= 3.0.3-1 fileutils modutils >= 2.4.18 initscripts >= 5.83 mkinitrd >= 3.2.6 /bin/sh rpmlib(PayloadFilesHavePrefix) <= 4.0-1 rpmlib(CompressedFileNames) <= 3.0.4-1