For example, emerge =udev-42 fails, while emerge =udev-042 works. They are clearly the same number.
This is by design it seems as the there is code to explicitly prevent 042 and 42 from being equal. It is most likely that way to ensure that two different version strings never resolve to the same numeric version. However, after looking at the code, it seems to be flawed. While the code does keep 042 and 42 different, it seems to make 042 and 0420 the same.
They really shouldn't be different in this world. Any number prefaced by any number of zero's should resolve to the original number.
I assume this was coming from the 1.023 != 1.23 requirement. Offhand it looks to be fixed (= first version number component is special) in my rewrite in bug 37406.
Donnie, can you confirm that it's fixed in 2.1?
No, it's not fixed in 2.1_pre6-r5. donnie@supernova ~ $ emerge -vp =udev-89 These are the packages that would be merged, in order: Calculating dependencies emerge: there are no ebuilds to satisfy "=udev-89".
Created attachment 83942 [details, diff] change match_from_list to use vercmp() for all operators Ok, it's a bit more subtle than I thought. If you check you'll notice that it works for the range operators (>, <, >=, <=) but not for =, ~ or =*, as those don't rely on vercmp for equality checks but use string comparison. The attached patch changes the relevant match_from_list function to always use vercmp(), so it should solve your problem, please confirm (should apply on any 2.1 portage, and maybe even on 2.0).
This is in svn r5510:5521 and released in 2.1.2_rc4-r8.