Gentoo Archives: gentoo-dev

From: hasufell <hasufell@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH vcs-snapshot] Use ${WORKDIR}/${P} rather than ${S} to support ${S} overrides.
Date: Mon, 04 Jun 2012 14:24:02
Message-Id: 4FCCC412.6000000@gentoo.org
In Reply to: [gentoo-dev] [PATCH vcs-snapshot] Use ${WORKDIR}/${P} rather than ${S} to support ${S} overrides. by "Michał Górny"
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 On 06/04/2012 11:59 AM, Michał Górny wrote:
5 > One could set S to work on a subtree of the tarball rather than the
6 > whole tarball. Considering that, it's probably better to use
7 > ${WORKDIR}/${P} rather than ${S}.
8 >
9 > Fixes: https://bugs.gentoo.org/show_bug.cgi?id=419479 ---
10 > gx86/eclass/vcs-snapshot.eclass | 5 +++-- 1 file changed, 3
11 > insertions(+), 2 deletions(-)
12 >
13 > diff --git a/gx86/eclass/vcs-snapshot.eclass
14 > b/gx86/eclass/vcs-snapshot.eclass index 6748360..23cd696 100644 ---
15 > a/gx86/eclass/vcs-snapshot.eclass +++
16 > b/gx86/eclass/vcs-snapshot.eclass @@ -9,7 +9,8 @@ # @DESCRIPTION: #
17 > This eclass provides a convenience src_unpack() which does support
18 > # working with snapshots generated by various VCS-es. It unpacks
19 > those -# to ${S} rather than the original directory containing
20 > commit id. +# to ${WORKDIR}/${P} rather than the original directory
21 > containing +# commit id. # # Note that this eclass handles only
22 > unpacking. You need to specify # SRC_URI yourself, and call any
23 > autoreconfiguration as necessary. @@ -41,5 +42,5 @@
24 > vcs-snapshot_src_unpack() {
25 >
26 > # github, bitbucket: username-projectname-hash # gitweb:
27 > projectname-tagname-hash - mv *-*-[0-9a-f]*[0-9a-f]/ "${S}" || die
28 > + mv *-*-[0-9a-f]*[0-9a-f]/ "${WORKDIR}"/${P} || die }
29
30 Currently that eclass does not support multiple snapshot sources/tarballs.
31
32 I would suggest to fix that. My proposal currently breaks 6 ebuilds
33 which do not follow the newly described standard.
34
35 This way you could merge data and source snapshots from vcs.
36 -----BEGIN PGP SIGNATURE-----
37 Version: GnuPG v2.0.19 (GNU/Linux)
38 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
39
40 iQEcBAEBAgAGBQJPzMQSAAoJEFpvPKfnPDWzJdMH/AuhgbDeVdnJViP+zZNjsq4B
41 C2FlaPCpl3HHTrMi7HhbFmbOnZeLA3VLaffdvaPvZU0O1RxhOQPNfp4t8/E2iuHF
42 q9vVwQFQe19izFa7EgapD2EOUVUeaNMGoX0K2qRgtfLeBwnLWsnagMYZkV2+5skA
43 84vnyRYtaDEx6Z+M0UipwFnubrgmItbvX7F3XZ3omCdlSjXaRDO0sc2hqMFjeZ5P
44 ESGfbWxFX59ztmxBni0iSJE3NdSiYr1mjuW6eFZazIq9T6cinByXfMJgbdz7N14e
45 8HaSxMTc6PVWUTVbmpj3POWnZ+KCHbFze39rO5HzY4ZPMIL4xTxXAppg2FnyhF4=
46 =KUJi
47 -----END PGP SIGNATURE-----

Attachments

File name MIME type
vcs-snapshot.eclass.diff text/x-patch
vcs-snapshot.eclass text/plain

Replies