For Go modules, that will become the default upstream in August,
Google
invented holed BuildRequires version ranges:
– anything starting with version
– except a list of specific version exclusions (not exclusion ranges,
specific versions)
Basically upstreams are allowed to declare incompatible versions, but
Google would really like them to keep ascendent API compatibility
(and Google requires module renaming on major version changes, so there
is no upper limit to the API compatibility)
Is the correct way to represent those in rpm:
BuildRequires: ((golang-module(github.com/stretchr/testify) >= 1.3.0) and
((golang-module(github.com/stretchr/testify) < 1.3.2~0.20180906233101.161cd47e91fd) or
(
golang-module(github.com/stretchr/testify) > 1.3.2~0.20180906233101.161cd47e91fd)) and
((golang-module(github.com/stretchr/testify) < 1.3.2~1.pre1) or
(
golang-module(github.com/stretchr/testify) > 1.3.2~1.pre1)) and
((golang-module(github.com/stretchr/testify) <
1.3.2~1.pre1.0.20180628173108.788fd7840127) or (
golang-module(github.com/stretchr/testify)
> 1.3.2~1.pre1.0.20180628173108.788fd7840127)))
or am I missing something obvious?
Well using and/or is wrong to start with because they allow the
different conditions to be satisfied by different packages.
I think something like this would work:
BuildRequires: (x >= 1.3.0 without x = 1.3.2 without x = 1.3.4)
That requires a single package that meets the first condition
but not either of the other two conditions if I'm reading the
documentation correctly.
Tom
--
Tom Hughes (tom(a)compton.nu)