Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-pms
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-pms@g.o
From: Brian Harring <ferringb@...>
Subject: Re: EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
Date: Sat, 28 Apr 2012 20:24:54 -0700
On Sat, Apr 28, 2012 at 06:14:30PM +0100, Ciaran McCreesh wrote:
> On Sat, 28 Apr 2012 19:11:03 +0200
> Tiziano M??ller <dev-zero@g.o> wrote:
> > Could we also get an interface to disk- and memory-space requirements?
> > 
> > Something like:
> >   
> >   EREQUIRE_DISK="2G"
> >   EREQUIRE_MEMORY="1G"
> > 
> > which gets checked in pre_pkg_setup?
> 
> Is there anything the package mangler can do better than check-reqs
> here?

It can do it w/out going to bash, which is going to slow down the 
resolution validation- the time spent on pkg_pretend, particularly bad 
ones, is surprisingly high.

One potential thought there; for things like kernel checks, it would 
be nice if there was some way to cache those results.

Specifically, have the check set a var/id in some fashion, which the 
PM then exposes in later pkg_pretend invocations, which the 
eclass/bash implementation could check for and bypass the check.

Mind you, this is a bit crazy, but something like the following 
primitives:

pms_register_pretend_succeeded <identifier>
pms_register_pretend_ran_already <identifier>

Then for convenience, having a handler like thus:
pms_pretend_run_once [<identifier> function <args> | function]

So, using ati-drivers as an example, the pkg_pretend goes from
pkg_pretend() {
        # workaround until bug 365543 is solved
        if use modules; then
                linux-info_pkg_setup
                require_configured_kernel
                _check_kernel_config
        fi
}

to
pkg_pretend() {
  if use modules; then 
    linux-info_pkg_setup
    pms_pretend_run_once require_configured_kernel
    pms_pretend_run_once _check_kernel-config
  fi
}

You get the idea; in doing so, we'd chop .3s-1s off every one of 
those.

Either way, just a thought- feel free to shred it.
~harring


Replies:
Re: EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
-- Tiziano Müller
References:
EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
-- Ciaran McCreesh
Re: EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
-- Tiziano Müller
Re: EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
-- Ciaran McCreesh
Navigation:
Lists: gentoo-pms: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Re: EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
Next by thread:
Re: EAPI 5 (Was: Re: [gentoo-dev] Re: Making user patches globally available)
Previous by date:
Re: EAPI 5
Next by date:
Re: EAPI 5


Updated Jul 18, 2012

Summary: Archive of the gentoo-pms mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.