Gentoo Archives: gentoo-devhelp

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

Attachments

File name MIME type
signature.asc application/pgp-signature