RPM will happily build an rpm from a spec file that contains:
Provides: webserver mod_perl
Conflicts: apache apache-devel mod_perl
And then it will complain that mod_perl conflicts with the package when you
install it. This confuses the user because mod_perl isnt installed. RPM
shouldn't let you do such stupid things.
Currently it's the responsibility of the packager to "Don't do this". It's
not possible at this time to identify all (or even most of the important)
problems like this at build time. SOmeday ...
Changing component (and summary)
I don't believe that the problem of detecting self-conflicting
packages is generally solvable, nor even sufficiently solvable
to attempt a fix.