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.
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.