Below is the quote from my textbook while explaining naming convention of a package (eg : packagename-a.b.c-x.arch.rpm).
Build No : The number following the version number (x) is the build number. Many distribution maintainers add a letter code to the build number to distinguish their packages from those of others. Note that these numbers are not comparable across package maintainers— George's build number 5 of a package is not necessarily an improvement on Susan's build number 4 of the same package.
Below is the quote while explaining upgrading of a package
Warning: It's possible to distribute the same program under different names. In this situation, upgrading may fail or it may produce a duplicate installation, which can yield bizarre program-specific malfunctions. Red Hat has described a formal system for package naming to avoid such problems, but they still occur occasionally. Therefore, it's best to upgrade a package using a subsequent release provided by the same individual or organization that provided the original.
Q-1 So as per quote-1; the build no. is associated with some letter specific to distro. maintainer, so it may fail to upgrade because of different name? & thus wont know whether its an upgraded version over current installation?
Q-2 But in case of same distro/name how does rpm decide whether its an upgraded version ? Does it parse the name of the package and pick the version-no from the name? If yes then why would it fail in case of different distro. as well ?