Gentoo Archives: gentoo-devhelp

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

Replies

Subject Author
Re: [gentoo-devhelp] Re: Writing ebuilds that replace others but with different name Justin <justin@×××××××××.net>