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: Fri, 25 Sep 2009 21:11:42
Message-Id: h9jbl8$a1u$1@ger.gmane.org
In Reply to: Re: [gentoo-devhelp] Re: Writing ebuilds that replace others but with different name by "Sebastián Magrí"
1 On 09/25/2009 10:49 PM, Sebastián Magrí wrote:
2 > El vie, 25-09-2009 a las 15:35 +0200, Justin escribió:
3 >> Nikos Chantziaras schrieb:
4 >>> On 09/24/2009 11:38 PM, Justin wrote:
5 >>>> Nikos Chantziaras wrote:
6 >>>>> I seem to have some fundamental "flaw" in portage. It seems I am not
7 >>>>> able to write an ebuild that will in effect be able to replace another
8 >>>>> one but with a different name.
9 >>>>>
10 >>>>> With RPMs, no matter how the RPM is named, it has "provides" data in it.
11 >>>>> Is there some similar mechanism in portage? It seems to me that if
12 >>>>> the
13 >>>>> name of an ebuild is changed, then *all* ebuilds depending on it will
14 >>>>> have to change too. That looks like a PITA to me if it's true.
15 >>>>>
16 >>>>> For example, if I have an overlay that provides alternative/altered
17 >>>>> packages of already existing ones in the portage tree, they will "clash"
18 >>>>> with portage. Let's assume that my overlay provides an ebuild called
19 >>>>> "foo-alt" which is a variation of a package in portage called "foo", but
20 >>>>> is totally compatible with it. What I'm looking for is being able to
21 >>>>> emerge "foo-alt", but have the ebuild state clearly that it provides the
22 >>>>> "foo" dependency, so ebuilds depending on "foo" will be satisfied if
23 >>>>> "foo-alt" is installed but "foo" isn't.
24 >>>>>
25 >>>>> Possible?
26 >>>>>
27 >>>>>
28 >>>> Thats's what virtuals are good for. As an example see virtual/jre.
29 >>>> But in principle you are right. renaming a package is a headache and
30 >>>> should really be avoided.
31 >>>
32 >>> I'm not sure how I can use virtuals to provide an alternative but
33 >>> completely compatible package. I'll give a straight example:
34 >>>
35 >>> In my overlay, there's "x11-libs/qt-opengl-alt". It is a variation of
36 >>> qt-opengl, providing and *replacing* all files in it. However, if I
37 >>> unmerge qt-opengl and install qt-opengl-alt instead, even though the
38 >>> installed packages depending on qt-opengl work perfectly fine with it
39 >>> (it's fully compatible), an "emerge -uDN world" will try to pull
40 >>> qt-opengl back in because it thinks it's missing (and this will of
41 >>> course result in a file collision since qt-opengl-alt is also installed,
42 >>> providing the same files).
43 >>> [...]
44 >> Thats right, the only thing what you can do, is naming your ebuild
45 >> x11-libs/qt-opengl as well and give it higher version number as the one
46 >> in the tree.
47 >
48 > Why don't just use revision numbers? that's what I've always done...
49
50 Because if a higher version shows up in portage, it will be updated to
51 that one.
52
53 The only thing that seems to help is to prefix it with an insanely high
54 number, like "qt-opengl-99.4.5.2". However, this has the drawback that
55 it only works for just one overlay. It's just a kludge. It's actually
56 the same package, just a different version of it. The fundamental
57 problem of being unable to provide* alternative packages that are easy
58 to use by end users isn't solved.
59
60 * Note that the focus is on "provide" to others, not "use" myself.

Replies

Subject Author
Re: [gentoo-devhelp] Re: Writing ebuilds that replace others but with different name "Sebastián Magrí" <sebasmagri@×××××.com>