Requires: npm(foo) >= 1.0 Requires: npm(foo) < 2.0
is simply wrong because if you have npm-foo-0.9 and npm-foo-2.0, both will be pulled in and nothing will work. Instead, you should generate
npm-foo-0.9
npm-foo-2.0
Requires: (npm(foo) >= 1.0 with npm(foo) < 2.0)
Also, this should help with more than 2 requirements as nodejs-packaging right now doesn't support them.
This should work just fine for F27+.
Did you mean with there? Only I don't see any mention of that at http://rpm.org/user_doc/boolean_dependencies.html? Did you mean and instead?
with
and
No, there is no difference between 'and' and multiple Requires. I mean specifically 'with' because it matches by only one package.
So is that documented somewhere else then?
@tomh, no. There is only ticket about documenting them -- https://github.com/rpm-software-management/rpm-web/issues/3
But basicaly with richop makes sure that one package satisfies all conditions.
Fixed in d55aa33e55a13be29f59b4ef571e1dc2bd9492b2.
Metadata Update from @tomh: - Issue status updated to: Closed (was: Open)
@tomh Thanks for quick fix!
P.S. I thought you would add some guards for Fedora vs EPEL (not sure if latter supports nodejs tho)
Well I've only built it in rawhide at the moment. I don't do EPEL stuff myself so I'll leave that sort of thing up to whoever does but most likely EPEL will just stick with the older version for now.
This has caused almost many of nodejs modules I maintain in rawhide rebuild are broken now. Isn't there any simple way to fix all broken dependencies automatically?
Can it be not possible to convert say "dependencies": { "sample" : "~0.1.1" } to requires (npm(duplexer)) instead of requires (npm(duplexer) >= 0.1.1 with npm(duplexer) < 0.2)
I think if I need to fix now such a dependency issue then I will just add in spec %nodejs_fixdep sample and it will be fixed right?
Sorry I don't understand. How has it broken anything?
If your module depends on "~0.1.1" then ">= 0.1.1 && < 0.2" is correct. Just changing it to allow any version certainly isn't correct.
If you think upstreams dependency can be relaxed then that is a decision you need to make as a packager - it's not something we can just globally assume.
Sorry to confuse you. Let me take actual example. I got this
On x86_64: nodejs-stream-combiner-0.2.1-6.fc28.noarch requires (npm(duplexer) >= 0.1.1 with npm(duplexer) < 0.2) nodejs-stream-combiner-0.2.1-6.fc28.noarch requires (npm(through) >= 2.3.4 with npm(through) < 2.4)
I saw nodejs-duplexer-0.1.1-7.fc28.noarch.rpm provides npm(duplexer) = 0.1.1 and nodejs-through-2.3.8-3.fc27 (just realized this has not attempted even for mass rebuild??) provides npm(through) = 2.3.8
What is wrong happening to produce broken deps?
Oh that's just because the spam-o-matic script doesn't understand rich deps.
See https://pagure.io/releng/issue/6365 for details...
@tomh Oh I was not knowing that. Sorry for the noise on this ticket. Thanks for the referenced ticket.