Use rubygem(foo) or rubygem-foo

Vít Ondruch vondruch at redhat.com
Mon Jan 20 08:34:04 UTC 2014


Dne 19.1.2014 23:37, Achilleas Pipinellis napsal(a):
> I know that both result to the same thing (if I remember correctly I had
> asked Vit about this in IRC), but I have forgotten their real difference.
>
> My attention got caught by a comment Josef made in one of his reviews
> [0], saying that rubygem-foo is the new syntax. If that's the case, I
> would like to propose 2 changes:
>
> a) A reference in the wiki
> b) An implementation for gem2rpm
>
> I guess b) could be fairly easy by changing the templates.
>
> By starting with these steps, there will be a push to use the new syntax
> from now on. What do you think?
>
> [0]: https://bugzilla.redhat.com/show_bug.cgi?id=979749#c2
>

Historically, the idea of rubygem(foo) was that rubygem(foo) should
correspond to require 'foo'. However, I am not sure that this was always
true, since this was definitely underdocumented and guidelines stated
that you should provide rubygem(%{gem_name}) instead. And the question
is if we should support this or not. This might be useful for some gems,
where the name of gem differs from the require-able file, for example
rubygem-bcrypt-ruby comes to me mind.

When we overhauled packaging guidelines during migration to Ruby 1.9.3,
nobody remembered the history correctly and FPC decided to drop the note
about rubygem(foo) require.

With regards to comment [0], I would argue what is new or old syntax.
They are both legal as long as they are satisfied IMO.


Vít


More information about the ruby-sig mailing list