1 |
Nikos Chantziaras schrieb: |
2 |
> On 09/24/2009 11:38 PM, Justin wrote: |
3 |
>> Nikos Chantziaras wrote: |
4 |
>>> I seem to have some fundamental "flaw" in portage. It seems I am not |
5 |
>>> able to write an ebuild that will in effect be able to replace another |
6 |
>>> one but with a different name. |
7 |
>>> |
8 |
>>> With RPMs, no matter how the RPM is named, it has "provides" data in it. |
9 |
>>> Is there some similar mechanism in portage? It seems to me that if |
10 |
>>> the |
11 |
>>> name of an ebuild is changed, then *all* ebuilds depending on it will |
12 |
>>> have to change too. That looks like a PITA to me if it's true. |
13 |
>>> |
14 |
>>> For example, if I have an overlay that provides alternative/altered |
15 |
>>> packages of already existing ones in the portage tree, they will "clash" |
16 |
>>> with portage. Let's assume that my overlay provides an ebuild called |
17 |
>>> "foo-alt" which is a variation of a package in portage called "foo", but |
18 |
>>> is totally compatible with it. What I'm looking for is being able to |
19 |
>>> emerge "foo-alt", but have the ebuild state clearly that it provides the |
20 |
>>> "foo" dependency, so ebuilds depending on "foo" will be satisfied if |
21 |
>>> "foo-alt" is installed but "foo" isn't. |
22 |
>>> |
23 |
>>> Possible? |
24 |
>>> |
25 |
>>> |
26 |
>> Thats's what virtuals are good for. As an example see virtual/jre. |
27 |
>> But in principle you are right. renaming a package is a headache and |
28 |
>> should really be avoided. |
29 |
> |
30 |
> I'm not sure how I can use virtuals to provide an alternative but |
31 |
> completely compatible package. I'll give a straight example: |
32 |
> |
33 |
> In my overlay, there's "x11-libs/qt-opengl-alt". It is a variation of |
34 |
> qt-opengl, providing and *replacing* all files in it. However, if I |
35 |
> unmerge qt-opengl and install qt-opengl-alt instead, even though the |
36 |
> installed packages depending on qt-opengl work perfectly fine with it |
37 |
> (it's fully compatible), an "emerge -uDN world" will try to pull |
38 |
> qt-opengl back in because it thinks it's missing (and this will of |
39 |
> course result in a file collision since qt-opengl-alt is also installed, |
40 |
> providing the same files). |
41 |
> |
42 |
> Changing the category also doesn't help ("x11-libs-alt/qt-opengl" for |
43 |
> example). |
44 |
> |
45 |
> So virtuals don't seem to have anything to do with with my problem. |
46 |
> What's missing is something like RPM's "provides" (so the qt-opengl-alt |
47 |
> ebuild would be able to say "I provide the qt-opengl package.) From |
48 |
> your answer, I take it that portage doesn't offer anything like this and |
49 |
> the ebuild's name is hardcoded to be the package it provides :P |
50 |
> |
51 |
> |
52 |
Thats right, the only thing what you can do, is naming your ebuild |
53 |
x11-libs/qt-opengl as well and give it higher version number as the one |
54 |
in the tree. |