Hello. Last time i'm noticed, that not all developer have clear understanding about how perl gentoo-specific version scheme works. We already have the module[0], which can help with convertion, see below how it works[1]. In other words, it might be useful to have repoman check for version scheme if possible. [0] - dev-perl/Gentoo-PerlMod-Version [1] - zlogene@unrandom ~ $ /usr/bin/gentoo-perlmod-version.pl 0.70 0.70 => 0.700.0 zlogene@unrandom ~ $
If you just want to invoke it to return a translated number: FOO="$(gentoo-perlmod-version.pl --oneshot 0.70)" is apropos of FOO="0.700.0"
Basically the test should schematically work like this: if "ebuild inherits perl-module.eclass (direct or indirect)" and "ebuild defines MODULE_VERSION" then VALUE1=${PV} VALUE2=$(gentoo-perlmod-version.pl --oneshot ${MODULE_VERSION}) test fails if VALUE1 != VALUE2 endif ----- of course re-writing this in python might make sense for a repoman test...
Though getting it *right* in python however could be far more challenging than you'd expect. Even how perl's version.pm normalises internally is a bit mystical, and this utility heavily relies on that module to do its dirty work, so that it is directly asking the perl versioning scheme how to interpret versions given. Attempts I've seen so far at replicating this behaviour without using perl's implementation have more often than not simply been broken. For instance, euscan habitually seems to think its "1.2." instead of "1.2.0"
(In reply to Kent Fredric (IRC: kent\n) from comment #3) > Though getting it *right* in python however could be far more challenging > than you'd expect. > It's probably easier then to call an external perl script *once* per dev-perl ebuild in such a plugin.
Yes, adding a non-python plugin is possible for repoman. It will need a python wrapper though. For an example, see the webrsync portage module. It calls the bash based emerge-webrsync command. And the repoman modules are I think quite simple. I can help with the repoman module if you can provide the perl to run.
For anyone interested in the check and not the repoman-specific implementation, it's been available in the last couple pkgcheck releases and currently goes by the keyword result "MismatchedPerlVersion" as seen currently in CI.
I'd say ci is enough. Repoman is slow-mode developed thing. The main idea was to give developers warnings about misversioning, the tooling performing this check is less relevant.