Quoting from the manpage: --- * means match any version of the package so long as the specified base is matched. So with a version of '2*', we can match '2.1', '2.2', '2.2.1', etc... and not match version '1.0', '3.0', '4.1', etc... --- It is unclear (and because it is written as a glob, not intuitive either) whether "2*" also matches "20". Is it a special glob adjusted for version numbers, so that it only matches "2 and later, but earlier than 3_pre"? Or is it a plain glob? I stumbled into this when I tried to write "=...-2.2.0.*" in my /etc/portage/package.keywords, to specifically exclude versions like "2.2.01". Reproducible: Always
Thanks, there's a fix in git here: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=6d935d3362d9bff8da88e2e7a02062a879e7017e
PMS 2010-01-18 says about this: --- = Exactly equal to the specified version. Special exception: if the version specified has an asterisk immediately following it, a string prefix comparison is used instead. When an asterisk is used, the specification must remain valid if the asterisk were removed. (An asterisk used with any other operator is illegal.) --- So it indeed is a string wildcard, without being version aware. My reading of the above text is that "2*" will also match "20", "2_pre" and the like. Maybe this could be mentioned in the manpage. I propose: --- \fI*\fR means match any version of the package so long as the specified <string prefix> is matched. So with a version of '2*', we can match '2.1', '2.2', '2.2.1', etc... and not match version '1.0', '3.0', '4.1', etc... The version part that comes before the '*' must be a valid version in the absence of the '*'. <Beware that, due to the string matching nature, also "20" will be matched by "2*".> ---
Thanks, I've included your words here: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=2b1eceaf79ac667eecdf1ef9585592a235c8d93f
This is in 2.2_rc68, but I'll leave this bug open until it's in an unmasked version.
This is fixed in 2.1.9.