1 |
Marijn wrote: |
2 |
>> Is it feasable to extend Portage to allow a file to be owned by |
3 |
>> several |
4 |
>> slots and remove it only once the last slot is uninstalled (aka: once |
5 |
>> the ebuild is completely uninstalled)? |
6 |
> |
7 |
> Do we have any guarantees that the file you want to share will be |
8 |
> compatible |
9 |
> with all gems that will possibly use it? |
10 |
|
11 |
Only executable wrappers are subject to sharing and those are |
12 |
generated by RubyGems, not written by an author. Unless RubyGems |
13 |
changes it's policy (and I don't see any signs for this), it's safe to |
14 |
assume that the wrapper will work for all gem versions. |
15 |
|
16 |
Marijn wrote: |
17 |
> You could split the executable off into its own package to avoid this |
18 |
> duplication. On the other hand, these file collisions between |
19 |
> different versions |
20 |
> of the same gem seem to be an upstream problem; how exactly does |
21 |
> RubyGems handle |
22 |
> this? |
23 |
|
24 |
It doesn't have to. The generated code is downwards compatible and |
25 |
thus an update will simply overwrite the wrapper. (In most cases, the |
26 |
new wrapper code is identical.) |
27 |
|
28 |
Marijn wrote: |
29 |
> Hmm, so you aren't merely claiming compatibility (like I asked about |
30 |
> above) but |
31 |
> identicalness (is that even a word?). Is that really realistic? |
32 |
|
33 |
Check the wrappers out: Even executables of different gems have only |
34 |
minor differences. Here's an example with rake (make for Ruby) and |
35 |
passenger-install-apache2-module (the mod_passenger installer): |
36 |
|
37 |
> --- /Gentoo/usr/bin/passenger-install-apache2-module 2009-05-06 |
38 |
> 21:45:46 +0200 |
39 |
> +++ /Gentoo/usr/bin/rake 2009-05-06 21:46:01 +0200 |
40 |
> @@ -2,7 +2,7 @@ |
41 |
> # |
42 |
> # This file was generated by RubyGems. |
43 |
> # |
44 |
> -# The application 'passenger' is installed as part of a gem, and |
45 |
> +# The application 'rake' is installed as part of a gem, and |
46 |
> # this file is here to facilitate running it. |
47 |
> # |
48 |
> |
49 |
> @@ -15,5 +15,5 @@ |
50 |
> ARGV.shift |
51 |
> end |
52 |
> |
53 |
> -gem 'passenger', version |
54 |
> -load 'passenger-install-apache2-module' |
55 |
> +gem 'rake', version |
56 |
> +load 'rake' |
57 |
|
58 |
|
59 |
Marijn wrote: |
60 |
>> - All outdated ebuilds must be kept due to gem dependencies to |
61 |
>> outdated versions. |
62 |
> |
63 |
> |
64 |
> I'm sure we can check this before gems are added and we can |
65 |
> periodically |
66 |
> automatically remove old gems. Everything could also be kept in an |
67 |
> overlay so as |
68 |
> not to pollute the tree. |
69 |
|
70 |
Of course this can be done. The question is whether it's worth the |
71 |
hassle. After all, executables from gems are the only issue Portage |
72 |
has with RubyGems and vice versa that I'm aware of. Btw: It would take |
73 |
at least two overlays - the second one for Gentoo Prefix. |
74 |
|
75 |
One followup about gem2ebuild: AFAIK gems don't track external |
76 |
dependencies. (Existing tools such as gem2rpm only convert inter-gem |
77 |
dependencies.) Therefore, automatically generated ebuilds are just as |
78 |
iffy as installing the gem directly. This can only be prevented if |
79 |
someone adds the dependencies either manually or with a template. And |
80 |
makes sure, that they are still correct on every release of the gem. |
81 |
It takes a lot of manpower to do this. |
82 |
|
83 |
Marijn wrote: |
84 |
> Haskell and Perl (and many more probably) each have repositories of |
85 |
> libraries/applications plus some sort of package manager to install |
86 |
> and keep |
87 |
> track of them. Is there a general solution? Is it possible to |
88 |
> redirect calls to |
89 |
> these external package managers to the main package manager through |
90 |
> some |
91 |
> interface (a bit like pkgkit)? What about eix support? |
92 |
|
93 |
I wouldn't be happy about such a solution. This "assimilation" sounds |
94 |
like trouble and the current co-existence works quite well in most |
95 |
cases. |
96 |
|
97 |
-sven |