Gentoo Archives: gentoo-python

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

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-python] Re: [PATCH] Introduce python_newscript(). Mike Gilbert <floppym@g.o>