1 |
Le dimanche 13 janvier 2013 à 16:08 +0100, Michał Górny a écrit : |
2 |
> On Sun, 13 Jan 2013 09:05:31 -0600 |
3 |
> William Hubbs <williamh@g.o> wrote: |
4 |
> |
5 |
> > On Sun, Jan 13, 2013 at 02:29:43PM +0100, Michał Górny wrote: |
6 |
> > > The run_in_build_dir() command simply runs given command |
7 |
> > > in the directory stated as BUILD_DIR. This variable is used commonly |
8 |
> > > by autotools-utils, cmake-utils and python-r1 eclasses, therefore I'm |
9 |
> > > proposing adding the relevant function to eutils. |
10 |
> > > --- |
11 |
> > > gx86/eclass/eutils.eclass | 19 +++++++++++++++++++ |
12 |
> > > 1 file changed, 19 insertions(+) |
13 |
> > > |
14 |
> > > diff --git a/gx86/eclass/eutils.eclass b/gx86/eclass/eutils.eclass |
15 |
> > > index 6588792..bb3c1e3 100644 |
16 |
> > > --- a/gx86/eclass/eutils.eclass |
17 |
> > > +++ b/gx86/eclass/eutils.eclass |
18 |
> > > @@ -1495,6 +1495,25 @@ prune_libtool_files() { |
19 |
> > > fi |
20 |
> > > } |
21 |
> > > |
22 |
> > > +# @FUNCTION: run_in_build_dir |
23 |
> > > +# @USAGE: <argv>... |
24 |
> > > +# @DESCRIPTION: |
25 |
> > > +# Run the given command in the directory pointed by BUILD_DIR. |
26 |
> > |
27 |
> > I think I would make this more generic if it is going in eutiles, |
28 |
> > e.g. rename it something like run_in_dir and pass in the directory as the |
29 |
> > first argument. |
30 |
> |
31 |
> That's not going to work for us since the command is subject to a loop |
32 |
> which sets BUILD_DIR, e.g.: |
33 |
> |
34 |
> python_foreach_impl run_in_build_dir ... |
35 |
> |
36 |
> with python_foreach_impl setting BUILD_DIR. |
37 |
|
38 |
FTR, this function is used as-is in quite a few gnome ebuilds that use |
39 |
python-r1 eclass. We thought that it could probably be used in other |
40 |
places but it would be nice if we could have changes to would make it |
41 |
not suitable for this purpose. |
42 |
|
43 |
-- |
44 |
Gilles Dartiguelongue <eva@g.o> |
45 |
Gentoo |