rpm tries to delete directories once it has reason to think that directory no longer contains files, but in practice it ends up printing lots of "error: cannot remove /... - directory not empty." I don't think this event is significant enough to print an error message, but that's just MHO. In any case, it does seem odd to me that it prints this while performing a package upgrade.
Yup. Reporting failed rmdir's is important to installer's and packagers, but needlessly confuses users. The error message will not be displayed if/when rpm runs a proper package reference count on directories. The first step, adding an index on directories in order to calculate the reference count is in rpm-4.0.3. The final step, retrieving the number of packages that use a directory so that the error messages will be displayed only when the last package attempts a rmdir that fails remains.
I'm marking this as CURRENTRELEASE, because the (bogus IMHO) error message is what is desired in rpm at the moment.