public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] Re: Files owned by multiple slots
@ 2009-05-12 20:55 Sven Schwyn
  2009-05-13 11:43 ` Gilles Dartiguelongue
  0 siblings, 1 reply; 12+ messages in thread
From: Sven Schwyn @ 2009-05-12 20:55 UTC (permalink / raw
  To: gentoo-dev

Gilles wrote:
> so this wrapper could be installed in a separate eselect sort of
> package ?
How exactly can this be done? If a gem creates five executables, would  
this mean that this gem comes in six ebuilds?
> If those kind of wrappers are generic enough, it could even be a  
> single
> eselect package and gems would enable (symlink to wrapper)  
> themselves at
> postinst. I'm an eselect n00b but this all sound like something an
> eselect module could do.

The wrappers can't be boiled down to one unified wrapper.
Cheers, -sven




^ permalink raw reply	[flat|nested] 12+ messages in thread
* [gentoo-dev] Re: Files owned by multiple slots
@ 2009-05-11 13:40 Sven Schwyn
  0 siblings, 0 replies; 12+ messages in thread
From: Sven Schwyn @ 2009-05-11 13:40 UTC (permalink / raw
  To: gentoo-dev

Marijn wrote:
>> Is it feasable to extend Portage to allow a file to be owned by  
>> several
>> slots and remove it only once the last slot is uninstalled (aka: once
>> the ebuild is completely uninstalled)?
>
> Do we have any guarantees that the file you want to share will be  
> compatible
> with all gems that will possibly use it?

Only executable wrappers are subject to sharing and those are  
generated by RubyGems, not written by an author. Unless RubyGems  
changes it's policy (and I don't see any signs for this), it's safe to  
assume that the wrapper will work for all gem versions.

Marijn wrote:
> You could split the executable off into its own package to avoid this
> duplication. On the other hand, these file collisions between  
> different versions
> of the same gem seem to be an upstream problem; how exactly does  
> RubyGems handle
> this?

It doesn't have to. The generated code is downwards compatible and  
thus an update will simply overwrite the wrapper. (In most cases, the  
new wrapper code is identical.)

Marijn wrote:
> Hmm, so you aren't merely claiming compatibility (like I asked about  
> above) but
> identicalness (is that even a word?). Is that really realistic?

Check the wrappers out: Even executables of different gems have only  
minor differences. Here's an example with rake (make for Ruby) and  
passenger-install-apache2-module (the mod_passenger installer):

> --- /Gentoo/usr/bin/passenger-install-apache2-module	2009-05-06  
> 21:45:46 +0200
> +++ /Gentoo/usr/bin/rake	2009-05-06 21:46:01 +0200
> @@ -2,7 +2,7 @@
>  #
>  # This file was generated by RubyGems.
>  #
> -# The application 'passenger' is installed as part of a gem, and
> +# The application 'rake' is installed as part of a gem, and
>  # this file is here to facilitate running it.
>  #
>
> @@ -15,5 +15,5 @@
>    ARGV.shift
>  end
>
> -gem 'passenger', version
> -load 'passenger-install-apache2-module'
> +gem 'rake', version
> +load 'rake'


Marijn wrote:
>> - All outdated ebuilds must be kept due to gem dependencies to  
>> outdated versions.
>
>
> I'm sure we can check this before gems are added and we can  
> periodically
> automatically remove old gems. Everything could also be kept in an  
> overlay so as
> not to pollute the tree.

Of course this can be done. The question is whether it's worth the  
hassle. After all, executables from gems are the only issue Portage  
has with RubyGems and vice versa that I'm aware of. Btw: It would take  
at least two overlays - the second one for Gentoo Prefix.

One followup about gem2ebuild: AFAIK gems don't track external  
dependencies. (Existing tools such as gem2rpm only convert inter-gem  
dependencies.) Therefore, automatically generated ebuilds are just as  
iffy as installing the gem directly. This can only be prevented if  
someone adds the dependencies either manually or with a template. And  
makes sure, that they are still correct on every release of the gem.  
It takes a lot of manpower to do this.

Marijn wrote:
> Haskell and Perl (and many more probably) each have repositories of
> libraries/applications plus some sort of package manager to install  
> and keep
> track of them. Is there a general solution? Is it possible to  
> redirect calls to
> these external package managers to the main package manager through  
> some
> interface (a bit like pkgkit)? What about eix support?

I wouldn't be happy about such a solution. This "assimilation" sounds  
like trouble and the current co-existence works quite well in most  
cases.

-sven



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-06-02 17:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-12 20:55 [gentoo-dev] Re: Files owned by multiple slots Sven Schwyn
2009-05-13 11:43 ` Gilles Dartiguelongue
2009-05-13 14:34   ` Sven
2009-05-13 14:58     ` Duncan
2009-05-14 18:34       ` Sven
2009-05-14 18:38         ` Ciaran McCreesh
2009-05-15 13:41         ` Duncan
2009-05-17 12:12     ` Petteri Räty
2009-06-02 17:41       ` Sven
2009-06-02 17:43         ` Sven
2009-06-02 17:59         ` Hans de Graaff
  -- strict thread matches above, loose matches on Subject: below --
2009-05-11 13:40 Sven Schwyn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox