Gentoo Archives: gentoo-dev

From: Carsten Lohrke <carlo@g.o>
To: kde@g.o, portage@g.o
Cc: gentoo-dev@l.g.o
Subject: [gentoo-dev] problems with need-kde/qt and possible solutions
Date: Sat, 31 Jul 2004 00:22:46
Message-Id: 200407310222.28132.carlo@gentoo.org
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 I played with the kde.eclass today, to be sure what can/has to be done, to
5 remove the problematic need-kde/qt functions from ebuilds. For reasons see
6 Bug 25013 (comment 50 ff.) and Bug 58819.
7
8
9 Solution A (the quick and dirty one):
10
11 Introducing a NEED_KDE variable and calling need-kde ${NEED_KDE} inside of the
12 kde.eclass.
13
14 advantage:
15 - - that simple, that it is "implemented" already
16
17 disadvantages:
18 - - NEED_KDE has to be set before the ebuild inherits its eclass, which is not
19 better than having to put need-kde/qt after R/DEPEND
20 - - need-kde is still called outside of "portage functions"
21 - - disadvantages of need-kde remain; It always adds a >=kdelibs-x.y dependency,
22 even though it may be implied by <=kde-base/kdegraphics-x.z. This behaviour
23 can be overridden by setting NEED_KDE_DONT_ADD_KDELIBS_DEP, but it's hard to
24 find an ebuild which is using it (not even the kde-base/* ebuilds). So the
25 dependencies are often not "clean".
26
27
28 Solution B (my favorite):
29
30 Parsing simplified (w/o conditionals) ebuild R/DEPEND variables, which have to
31 be provided by Portage, inside of kde.eclass in a function
32 "set_dependencies()" that has to be executed, before Portage evaluates eclass
33 R/DEPEND variables.
34
35 advantages:
36 - - no extra NEED_KDE varible needed
37 - - all disadvantages of solution A do not apply
38
39 disadvantages:
40 - - need simplified ebuild variables provided by portage
41 - - need another function provided by portage
42
43
44 Both solutions are simply backwards compatible by setting a flag, if need-kde
45 is called.
46
47
48 Attachments:
49 - - modified kde{,functions}2.eclass which implement solution A, only renamed to
50 make sure not to interfere with the eclasses in cvs
51 - - eclasses.diff - for your convenience ;)
52 - - knemo-0.2.0.ebuild, which makes use of the change
53 -----BEGIN PGP SIGNATURE-----
54 Version: GnuPG v1.2.4 (GNU/Linux)
55
56 iD8DBQFBCuZEVwbzmvGLSW8RAo6+AKCeB3VxVyQB9hltzYnqM9m+5UmLNgCcCpMW
57 y9Hc9ddzrmkchlemZGZu/rk=
58 =79gS
59 -----END PGP SIGNATURE-----

Attachments

File name MIME type
eclasses.diff text/x-diff
kde2.eclass text/plain
kde-functions2.eclass text/plain
knemo-0.2.0.ebuild text/plain

Replies

Subject Author
Re: [gentoo-dev] problems with need-kde/qt and possible solutions Paul de Vrieze <pauldv@g.o>