Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: Gentoo Developer Mailing List <gentoo-dev@l.g.o>
Subject: [gentoo-dev] RFC: vcs-snapshot-r1.eclass -- a better eclass for VCS snapshots (and others)
Date: Thu, 07 Jun 2012 21:49:35
Message-Id: 20120607234952.504e9ce8@pomiocik.lan
1 Hello,
2
3 As it was pointed out, vcs-snapshot is unable to handle multiple
4 tarballs nicely. As fixing this would involve changing eclass API
5 (and they are packages which are known to break thanks to it), I'm
6 posting a new eclass for review. Of course, if the community insists,
7 I could just update the old eclass and fix the ebuilds broken that way.
8
9 The idea with the new eclass is to extract all supported archives
10 (which means .tar* at the point) into ${WORKDIR} subdirectories
11 matching their names. In other words, if you've got:
12
13 SRC_URI="http://foo/getbar -> ${P}.tar.bz2
14 http://foo/getbaz -> ${P}-data.tar.bz2"
15
16 You'd get the contents in ${WORKDIR}/${P} and ${WORKDIR}/${P}-data
17 respectively.
18
19 A few things to note:
20
21 1) the implemention just dumbly uses 'tar --strip-components'. If it
22 hits a tarball without a single top-level directory, scary things will
23 happen;
24
25 2) only tarballs are handled, other archives are just passed through
26 to unpack;
27
28 3) at some point the eclass could be extended to handle more formats.
29 So if you've got other archives in your SRC_URI, please make sure they
30 are named consistently with the parent dir, so that they would not
31 relocate when support for that particular format is added.
32
33 By the way, the credit for the overall idea goes to hasufell.
34
35 --
36 Best regards,
37 Michał Górny

Attachments

File name MIME type
vcs-snapshot-r1.eclass text/plain
signature.asc application/pgp-signature

Replies