1 |
On 01/03/2011 04:40 PM, Samuli Suominen wrote: |
2 |
> Quoting PMS, Chapter 8: |
3 |
> |
4 |
> "All ebuild-defined variables discussed in this chapter must be defined |
5 |
> independently of any system, profile or tree dependent data, and must |
6 |
> not vary depending upon the ebuild phase." |
7 |
> |
8 |
> http://git.overlays.gentoo.org/gitweb/?p=proj/pms.git;a=blob_plain;f=ebuild-vars.tex;hb=HEAD |
9 |
> |
10 |
> |
11 |
> |
12 |
> This is very inconvinent rule for example, github tarballs where the |
13 |
> directory changes with every release. I've used this: |
14 |
> |
15 |
> src_unpack() { |
16 |
> unpack ${A} |
17 |
> cd *-${PN}-* |
18 |
> S=`pwd` |
19 |
> } |
20 |
> |
21 |
|
22 |
This code could be simplified as: |
23 |
S=*-${PN}-* |
24 |
|
25 |
$ mkdir foo-1.2.3 |
26 |
$ PN=foo |
27 |
$ S=foo-* |
28 |
$ echo $S |
29 |
foo-1.2.3 |
30 |
|
31 |
> |
32 |
> |
33 |
> Far as I know, S= isn't used to generate metadata cache, so it's PMS |
34 |
> that need fixing for it's wording: |
35 |
> |
36 |
> "All ebuild-defined variables used to generate metadata cache, discussed |
37 |
> in this chapter..." |
38 |
> |
39 |
|
40 |
It can be done retroactively if Portage has always worked with S being |
41 |
defined inside phases and if that doesn't work then it can always be |
42 |
part of EAPI 5. I opened a bug to track the request: |
43 |
|
44 |
https://bugs.gentoo.org/show_bug.cgi?id=350478 |
45 |
|
46 |
Regards, |
47 |
Petteri |