Gentoo Archives: gentoo-dev

From: Paul de Vrieze <pauldv@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] question regarding inherit
Date: Fri, 04 Jun 2004 15:19:59
Message-Id: 200406041504.49677.pauldv@gentoo.org
In Reply to: Re: [gentoo-dev] question regarding inherit by Jason Stubbs
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On Friday 04 June 2004 00:31, Jason Stubbs wrote:
5 > On Friday 04 June 2004 03:53, foser wrote:
6 > > On Thu, 2004-06-03 at 19:41 +0200, Marius Mauch wrote:
7 > > > On 06/03/04 Aron Griffis wrote:
8 > > > > I'm under the impression that this is bad. Could somebody
9 > > > > please verify and explain for the sake of people on this list.
10 > > > > This particular example appears in the libxslt ebuilds, but the
11 > > > > kde ebuilds make use of a similar syntax:
12 > > > >
13 > > > > use python && inherit python
14 > > >
15 > > > Bad because it breaks the cache. Depending on the status of the
16 > > > python flag *on the rsync master* the cache settings are or are
17 > > > not modified by the python.eclass and could be completely
18 > > > different from the values the cache should have for the user.
19 > > > That's also the case for other cache variables like DEPEND,
20 > > > SRC_URI or SLOT, if you make them conditional on the environment
21 > > > it's likely that the cache values are wrong for some people.
22 > >
23 > > The problem is that it shouldn't be a problem to do things like
24 > > this, it's portage that makes it problematic. It is not obvious why
25 > > this is problematic, so situations like these are going to pop up
26 > > time and time again. In my opinion this need to be fixed in portage,
27 > > not necessarily in the ebuilds/eclasses. And yeah, i'm talking here
28 > > without any knowledge of portage cache handling, ideal world type of
29 > > talk.
30 >
31 > Three options:
32 >
33 > 1) Drop portage caching altogether.
34 > 2) Separate the global section into a separate non-bash file with new
35 > syntax. 3) Make everything constant in the global section of ebuilds.
36 >
37 > #1 is definately not acceptable at this stage as dep calculation time
38 > would take about 50 times as long. #2 is probably the best but offers
39 > no short term solution. Which leaves #3.
40 >
41 > Most dynamic stuff should be able to be done in pkg_setup(). Anybody
42 > who has more specific requirements should jump into #gentoo-portage to
43 > discuss them and find a better solution.
44
45 To this regard I have created a parser in c++ (with python frontend,
46 python is too slow for parsing) that can perform this. It refuses to
47 perform any dynamic functions, but is faster than the current bash based
48 parsing. It supports inheritance but no other toplevel functions.
49 Support for a limited set could be added if needed.
50
51 If anyone is interested I could make a tarbal of the sources
52
53 Paul
54
55 - --
56 Paul de Vrieze
57 Gentoo Developer
58 Mail: pauldv@g.o
59 Homepage: http://www.devrieze.net
60 -----BEGIN PGP SIGNATURE-----
61 Version: GnuPG v1.2.4 (GNU/Linux)
62
63 iD8DBQFAwHNxbKx5DBjWFdsRAq7rAKC8A9gZE6mW6uvnxHrUlDI0CImlTQCg6hLt
64 4ccttCmL+x434g5dn9CZvEE=
65 =d6dR
66 -----END PGP SIGNATURE-----
67
68 --
69 gentoo-dev@g.o mailing list