Gentoo Archives: gentoo-pms

From: "Tiziano Müller" <dev-zero@g.o>
To: gentoo-pms@l.g.o
Subject: Re: [gentoo-pms] EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
Date: Sun, 29 Apr 2012 14:20:44
Message-Id: 1335709224.4823.63.camel@storm
In Reply to: Re: [gentoo-pms] EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available) by Brian Harring
1 Am Samstag, den 28.04.2012, 20:24 -0700 schrieb Brian Harring:
2 > On Sat, Apr 28, 2012 at 06:14:30PM +0100, Ciaran McCreesh wrote:
3 > > On Sat, 28 Apr 2012 19:11:03 +0200
4 > > Tiziano M??ller <dev-zero@g.o> wrote:
5 > > > Could we also get an interface to disk- and memory-space requirements?
6 > > >
7 > > > Something like:
8 > > >
9 > > > EREQUIRE_DISK="2G"
10 > > > EREQUIRE_MEMORY="1G"
11 > > >
12 > > > which gets checked in pre_pkg_setup?
13 > >
14 > > Is there anything the package mangler can do better than check-reqs
15 > > here?
16 >
17 > It can do it w/out going to bash, which is going to slow down the
18 > resolution validation- the time spent on pkg_pretend, particularly bad
19 > ones, is surprisingly high.
20
21 pkg_pretend is not the (only) place to do the check since the available
22 space may change during the install (for example when telling the PM to
23 skip failed packages which may leave intermediate files of those
24 packages for investigation).
25
26 Furthermore, especially $T may not be available at pkg_pretend time.
27
28 >
29 > One potential thought there; for things like kernel checks, it would
30 > be nice if there was some way to cache those results.
31 >
32 > Specifically, have the check set a var/id in some fashion, which the
33 > PM then exposes in later pkg_pretend invocations, which the
34 > eclass/bash implementation could check for and bypass the check.
35 >
36 > Mind you, this is a bit crazy, but something like the following
37 > primitives:
38 >
39 > pms_register_pretend_succeeded <identifier>
40 > pms_register_pretend_ran_already <identifier>
41 >
42 > Then for convenience, having a handler like thus:
43 > pms_pretend_run_once [<identifier> function <args> | function]
44 >
45 > So, using ati-drivers as an example, the pkg_pretend goes from
46 > pkg_pretend() {
47 > # workaround until bug 365543 is solved
48 > if use modules; then
49 > linux-info_pkg_setup
50 > require_configured_kernel
51 > _check_kernel_config
52 > fi
53 > }
54 >
55 > to
56 > pkg_pretend() {
57 > if use modules; then
58 > linux-info_pkg_setup
59 > pms_pretend_run_once require_configured_kernel
60 > pms_pretend_run_once _check_kernel-config
61 > fi
62 > }
63 >
64 > You get the idea; in doing so, we'd chop .3s-1s off every one of
65 > those.
66 >
67 > Either way, just a thought- feel free to shred it.
68 > ~harring
69 >

Attachments

File name MIME type
smime.p7s application/x-pkcs7-signature