Gentoo Archives: gentoo-python

From: Mike Gilbert <floppym@g.o>
To: "Michał Górny" <mgorny@g.o>
Cc: gentoo-python@l.g.o, python@g.o, jlec@g.o
Subject: Re: [gentoo-python] Re: [PATCH] Introduce python_newscript().
Date: Sat, 02 Feb 2013 15:32:25
Message-Id: CAJ0EP41Q+M0abixaQdk+3PEGm9BTOQ7TxnrTVuX6vKSYoyUcSQ@mail.gmail.com
In Reply to: Re: [gentoo-python] Re: [PATCH] Introduce python_newscript(). by "Michał Górny"
1 On Sat, Feb 2, 2013 at 4:58 AM, Michał Górny <mgorny@g.o> wrote:
2 > On Fri, 1 Feb 2013 20:56:36 -0500
3 > Mike Gilbert <floppym@g.o> wrote:
4 >
5 >> On Fri, Feb 1, 2013 at 8:46 PM, Michał Górny <mgorny@g.o> wrote:
6 >> > Requested by jlec, I think.
7 >> > ---
8 >> > gx86/eclass/python-utils-r1.eclass | 47 ++++++++++++++++++++++++++++++--------
9 >> > 1 file changed, 37 insertions(+), 10 deletions(-)
10 >> >
11 >> > diff --git a/gx86/eclass/python-utils-r1.eclass b/gx86/eclass/python-utils-r1.eclass
12 >> > index b425302..c5a1f6e 100644
13 >> > --- a/gx86/eclass/python-utils-r1.eclass
14 >> > +++ b/gx86/eclass/python-utils-r1.eclass
15 >> > @@ -521,7 +521,34 @@ python_scriptinto() {
16 >> > python_doscript() {
17 >> > debug-print-function ${FUNCNAME} "${@}"
18 >> >
19 >> > + local f
20 >> > + for f; do
21 >> > + python_newscript "${f}" "${f}"
22 >> > + done
23 >> > +}
24 >>
25 >>
26 >> Won't this break on something like "python_doscript path/to/script"?
27 >> That would result in this call:
28 >>
29 >> python_newscript path/to/script path/to/script
30 >>
31 >> If I'm reading python_newscript correctly, $2 should not have any path
32 >> information.
33 >
34 > Correct, thanks. It's now:
35 >
36 > python_newscript "${f}" "${f##*/}"
37 >
38 > I've also removed 'oldfn' from python_newscript() which is practically
39 > unused.
40 >
41
42 Ok. +1 from me then.