1 |
On Mon, 03 Jan 2011 16:40:57 +0200 |
2 |
Samuli Suominen <ssuominen@g.o> wrote: |
3 |
|
4 |
> Quoting PMS, Chapter 8: |
5 |
> |
6 |
> "All ebuild-defined variables discussed in this chapter must be |
7 |
> defined independently of any system, profile or tree dependent data, |
8 |
> and must not vary depending upon the ebuild phase." |
9 |
> |
10 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=blob_plain;f=ebuild-vars.tex;hb=HEAD |
11 |
> |
12 |
> |
13 |
> |
14 |
> This is very inconvinent rule for example, github tarballs where the |
15 |
> directory changes with every release. I've used this: |
16 |
|
17 |
> src_unpack() { |
18 |
> unpack ${A} |
19 |
> cd *-${PN}-* |
20 |
> S=`pwd` |
21 |
> } |
22 |
|
23 |
I've been doing that in www-client/opera for ages, having got fed up |
24 |
with the varying packaging conventions used upstream: |
25 |
|
26 |
src_unpack() { |
27 |
unpack ${A} |
28 |
if [[ ! -d ${S} ]]; then |
29 |
cd "${WORKDIR}"/${PN}* || die "failed to enter work directory" |
30 |
S="$(pwd)" |
31 |
einfo "Setting WORKDIR to ${S}" |
32 |
fi |
33 |
} |
34 |
|
35 |
I've never had complaints. |
36 |
|
37 |
> Far as I know, S= isn't used to generate metadata cache, so it's PMS |
38 |
> that need fixing for it's wording: |
39 |
> |
40 |
> "All ebuild-defined variables used to generate metadata cache, |
41 |
> discussed in this chapter..." |
42 |
|
43 |
As far as I can tell, the chapter does not mention S, but it could be |
44 |
more specific. Don't see why it should, though. |
45 |
|
46 |
|
47 |
jer |