Gentoo Archives: gentoo-dev

From: Alex Alexander <wired@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Defining S= from ebuild phase, src_unpack() ?
Date: Mon, 03 Jan 2011 15:03:29
Message-Id: 20110103150256.GA8562@linuxized.com
In Reply to: [gentoo-dev] Defining S= from ebuild phase, src_unpack() ? by Samuli Suominen
1 On Mon, Jan 03, 2011 at 04:40:57PM +0200, 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 > This is very inconvinent rule for example, github tarballs where the
11 > directory changes with every release. I've used this:
12 >
13 > src_unpack() {
14 > unpack ${A}
15 > cd *-${PN}-*
16 > S=`pwd`
17 > }
18 >
19 > In $PORTDIR/sys-fs/udisks-glue/udisks-glue-1.2.0.ebuild to get S=
20 > defined as:
21 >
22 > fernandotcl-udisks-glue-f9b4839
23 >
24 > Where "f9b4839" changes...
25 >
26 >
27 > Far as I know, S= isn't used to generate metadata cache, so it's PMS
28 > that need fixing for it's wording:
29 >
30 > "All ebuild-defined variables used to generate metadata cache, discussed
31 > in this chapter..."
32
33 Yes, please :)
34
35 I've used that method to work around some github-tarballed packages
36 as well, seems to work pretty well.
37
38 Thanks,
39 --
40 Alex Alexander | wired
41 + Gentoo Linux Developer
42 ++ www.linuxized.com

Replies

Subject Author
Re: [gentoo-dev] Defining S= from ebuild phase, src_unpack() ? Thomas Kahle <tomka@g.o>