On 12/22/2011 11:45 AM, Mo Morsi wrote:
On 12/22/2011 11:19 AM, Scott Seago wrote:
On 12/22/2011 09:09 AM, Vít Ondruch wrote:
- In the Rubygems section:

"For every dependency on a Gem named gemdep, the package must contain a Requires on rubygem(%{gemdep}) with the same version constraints as the Gem"

Can this be a "should" or can we append a "where possible" onto the end of this. I've run into situations in the past where the constraints on the upstream gem are too restrictive, and infact the gem will work with a more lax gem set which we ship in Fedora

You are right. We should not be as strict. Actually, I believe that we should not use version unless necessary. We will try to polish this formulation according to your suggestion.
Actually, we need to be very careful here. We've been bitten in the past by creating RPMs with deps that don't strictly follow the gem deps, since you then have a gem installed that, strictly speaking, doesn't meet its gem dep requirements. If you end up using bundler for something, it's going to complain. We had a big problem with this when we had an RPM for which the underlying gem required rspec (2.0+), but we required the rspec sub-packages instead.


Ah good point. Actually now that I think about it the guidelines could use something to the effect of how to integrate bundler and other alternative gem-dependency management into all of this (its been a royal pain up to this point).

If nothing else, perhaps a guideline stating that if you modify the gem dependency list in the rpm spec, you must ensure that it is modified in bundler's Gemfile as well.

Actually expanding upon this, I'd love to see the work that Jay did with making bundler usage toggleable in conductor, a more generic plugin, able to be pulled into any project. Jay any thoughts on the feasibility of this?

Well the particular problem wasn't because bundler deps were mismatched. We were hitting problems because we didn't have all gems required in the gemspec weren't installed. Basically, if source isn't commented out in Gemfile, if we have a gem installed without its deps, bundler will install it (resulting in a gem _not_ from the fedora repos as a gem RPM in your dep chain. If source _is_ commented out (which is how we handle bundler for conductor on fedora -- to keep random different versions of Gems from being installed) we get errors about required gems not being available.

So, this brings us back to if the gemspec requires $foo, then our RPM had better require rubygem($foo) or we're asking for trouble down the line.