Mailinglist Archive: opensuse-ruby (83 mails)

< Previous Next >
Re: [opensuse-ruby] non-rubyabi-specific gem version dependencies
  • From: Adam Spiers <aspiers@xxxxxxxx>
  • Date: Thu, 22 Nov 2012 13:38:29 +0000
  • Message-id: <20121122133829.GA14655@pacific.linksys.moosehall>
Josef Reidinger (jreidinger@xxxxxxx) wrote:
Adam Spiers <aspiers@xxxxxxxx> wrote:
Josef Reidinger (jreidinger@xxxxxxx) wrote:
Adam Spiers <aspiers@xxxxxxxx> wrote:

[snipped]

So can someone please explain why having extra automatic Provides:
which omit the rubyabi would be asking for trouble?

Because you cannot mix gems from 1.8 and 1.9. So if you have one OBS
that builds againts 1.8 and another repo that builds againsts 1.9,
then there is potential problem ,that solver can choose mixture of
gems, that won't work.

I don't understand that at all. I'm suggesting adding extra Provides:
symbols to gem A so that gem B can have extra Requires: on one of
those symbols. That is *less* permissive than the current situation,
not more permissive, so it can't introduce any new scenario to the
solver (e.g. ones which mix 1.8 and 1.9 gems). It can only *reduce*
the number of possibilities the solver has to look at.

[snipped]

It creates problem, because you build your gem with ruby 1.8 or 1.9 and
what you want to achieve is ensure that rubygem(erubis:2.7) is also
built for same ABI. Without ABI version you risk install of gems for
different ABIs.

Why do you say "without ABI version" ? I am not suggesting dropping
the existing Requires which has the ABI version dependency. Maybe you
are missing the fact that rubygem-chef will still have this automatic
dependency:

Requires: rubygem(1.9:erubis) >= 0

as seen here:


https://build.opensuse.org/package/binary?arch=x86_64&filename=rubygem-chef-10.16.2-7.1.x86_64.rpm&package=rubygem-chef&project=systemsmanagement%3Achef&repository=openSUSE_12.2

When this is combined with the *additional* manual dependency which I
am suggesting, i.e.

Requires: rubygem(erubis:2.7)

then the combination ensures there is no risk of getting the wrong ABI
or the Build Service not knowing which version to choose.

BTW we are solving this issue also in OBS and we use in project
config prefer keyword -
http://en.opensuse.org/openSUSE:Build_Service_prjconf#Prefer
eg we have
Prefer: rubygem-activesupport-3_2
Prefer: rubygem-activeresource-3_2
Prefer: rubygem-activerecord-3_2
Prefer: rubygem-railties-3_2

OK, great! But that depends on the version-suffixed Provides: symbols
which coolo already stated he hopes can be dropped in the future:

http://lists.opensuse.org/opensuse-ruby/2012-07/msg00025.html

Yes, but when it exists then it creates multichoice.

You mean multiple choices of ABIs for the solver, or multiple choices
of syntax in prjconf? This is not true for the former. For the
latter, although it is true, that is the universal approach to
improving API design: a) introduce a new mechanism which deprecates
the old one, b) retire usage of the old, and finally c) drop support
for the old. So I don't see anything wrong with it.

So when it disappear, then you should not specify which version you
need and only dependency in gem should be enough.

When what disappears? Sorry, I don't understand what you meant here.

I think not for multichoice and I think that it is something that maybe
should be solved by build service to automatic make well defined choice
when you don't care what package or version is used.

They could have easily made it just choose the newest version. The
fact that they didn't suggests to me that there was a good reason for
the BS not to make the choice by itself.
--
To unsubscribe, e-mail: opensuse-ruby+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-ruby+owner@xxxxxxxxxxxx

< Previous Next >
Follow Ups