On 31/05/17 12:37, Nikola Pajkovsky wrote:
Antonio Larrosa <alarrosa@suse.de> writes:
On 31/05/17 12:26, Jan Engelhardt wrote:
On Wednesday 2017-05-31 12:23, Antonio Larrosa wrote:
The full list of macros added and simple descriptions is:
%pkg_version_at_least : Arguments are a package/capability name and a version number and returns true if package >= version %pkg_version_at_most : package <= version %pkg_version_equals : package == version %pkg_version_greater_than : package > version %pkg_version_less_than : package < version %pkg_version_not_equals : package != version
So, any opinion/suggestion about these macros?
So much to type. Can't we just have something similar to %requires_ge, _gt, _le, _lt, _eq, _ne?
I thought about that, but it's not actually a "requirement" so %requires_* is not accurate and may clash with other macro names in the future. I also thought about using %pkg_version_ge _gt ... but I thought what I submitted was more readable and you read the code more times than you write it :). I'm open to change the names in that sense though if it's generally accepted that those names are preferred.
And can that be in form
%pkg_version gcc <= 7.0
or there are limits on rpm side?
Hmm, I think that's a very good idea. Just note pkg_version is the macro that returns the package version, so I'll call it %pkg_version_test if that's ok for you. That could very well replace the %pkg_version_at_least/ %pkg_version_at_most/... "high-level" macros with something probably even more readable and equally short. -- Antonio Larrosa -- To unsubscribe, e-mail: opensuse-factory+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-factory+owner@opensuse.org