Gentoo Archives: gentoo-catalyst

From: "W. Trevor King" <wking@×××××××.us>
To: gentoo-catalyst@l.g.o
Subject: [gentoo-catalyst] Re: [PATCH] Commit a testpath file to source with instructions on it's use.
Date: Wed, 05 Mar 2014 04:02:50
Message-Id: 20140305040244.GA25297@odin.tremily.us
In Reply to: [gentoo-catalyst] [PATCH] Commit a testpath file to source with instructions on it's use. by Brian Dolbec
1 On Sun, Mar 02, 2014 at 03:07:03PM -0800, Brian Dolbec wrote:
2 > Make testpath automagic via dwfeed's tweak
3 > Update HOWTO on how to run the git checkout code directly without
4 > being installed.
5
6 I think this patch is a bit excessive, since I don't expect people to
7 be running catalyst before they could understand something like:
8
9 To run from the live checkout, use:
10
11 PYTHONPATH=. ./bin/catalyst -c catalyst.conf -f path/to/your.spec
12
13 But if folks want a script to set that up for them, I won't complain
14 ;).
15
16 > + # source ./testpath
17 > + # catalyst -c catalyst.conf -f path/to/your.spec
18
19 You use the versioned catalyst.conf file here, but…
20
21 > +# catalyst -c ./test.conf -p -f stage1.spec
22
23 … suggest 'test.conf' here. I think you should use catalyst.conf for
24 both, and leave it up to users to realize that they can have multiple,
25 non-overlapping configurations.
26
27 Also, there are two spaces after the '-p' ;).
28
29 > +export PATH="$(dirname $BASH_SOURCE[0])/bin:${PATH}"
30 > +
31 > +export PYTHONPATH="$(dirname $BASH_SOURCE[0]):${PYTHONPATH}"
32
33 I think you need braces around BASH_SOURCE[0]:
34
35 $ cat test.sh
36 echo "'${0}'"
37 echo "'${BASH_SOURCE[0]}'"
38 echo "'$BASH_SOURCE[0]'"
39 $ source test.sh
40 'bash'
41 'test.sh'
42 'test.sh[0]'
43
44 For extra elegance (to avoid a trailing colon if PYTHONPATH was
45 originally null or unset):
46
47 export PYTHONPATH="$(dirname ${BASH_SOURCE[0]})${PYTHONPATH:+:}${PYTHONPATH}"
48
49 Cheers,
50 Trevor
51
52 --
53 This email may be signed or encrypted with GnuPG (http://www.gnupg.org).
54 For more information, see http://en.wikipedia.org/wiki/Pretty_Good_Privacy

Attachments

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