1 |
Am 03.01.2011 15:40, schrieb Samuli Suominen: |
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 |
> In $PORTDIR/sys-fs/udisks-glue/udisks-glue-1.2.0.ebuild to get S= |
22 |
> defined as: |
23 |
> |
24 |
> fernandotcl-udisks-glue-f9b4839 |
25 |
> |
26 |
> Where "f9b4839" changes... |
27 |
> |
28 |
> |
29 |
> Far as I know, S= isn't used to generate metadata cache, so it's PMS |
30 |
> that need fixing for it's wording: |
31 |
> |
32 |
> "All ebuild-defined variables used to generate metadata cache, discussed |
33 |
> in this chapter..." |
34 |
> |
35 |
> |
36 |
> |
37 |
|
38 |
i used another workaround for github based packages: |
39 |
|
40 |
src_unpack() { |
41 |
unpack ${A} |
42 |
mv *-${PN}-* "${S}" |
43 |
} |
44 |
|
45 |
This saves a line and does not require the redefinition of S inside the function. |
46 |
|
47 |
|
48 |
-- |
49 |
Thomas Sachau |
50 |
|
51 |
Gentoo Linux Developer |