I would like to pass the --excludepath option to RPM through YUM since YUM doesn't provide an option like that. The --excludepath option tells the rpm command to exclude all files that start with the given path.
I believe you're out of luck if you want to use
yum. That's not a feature the yum package supports.
yum uses a subset of all the features provided by the
rpm command. (It actually uses a python module rpmUtils rather than calling
man 5 yum.conf:
tsflags Comma or space separated list of transaction flags to pass to the rpm transaction set. These include 'noscripts', 'notriggers', 'nodocs', 'test', 'justdb' and 'nocontexts'. 'repackage' is also available but that does nothing with newer rpm versions. You can set all/any of them. However, if you don't know what these do in the context of an rpm transaction set you're best leaving it alone. Default is an empty list.