1 |
On 11 June 2012 14:41, Michael Weber <xmw@g.o> wrote: |
2 |
> -----BEGIN PGP SIGNED MESSAGE----- |
3 |
> Hash: SHA256 |
4 |
> |
5 |
> Hi folks, |
6 |
> |
7 |
> i've some packages fetching SRC_URI from github.com |
8 |
> tarballs/tags/files like x11-misc/trayer-srg. |
9 |
> |
10 |
> Fortunately, github.com provides (mostly) stable tarballs that are fit |
11 |
> for manifestations (file sizes and checksums don't change). |
12 |
> There is no need to create/host tarballs to be picked up by mirrors. |
13 |
> |
14 |
> Unfortunately, these tarballs contain $author-$repository-$commitidabrev |
15 |
> (e.g. sargon-trayer-srg-5353f80) ad top directory. |
16 |
> |
17 |
> One approach is to define ${S} to match these additional data, but to |
18 |
> easy version bumps, I've started to rename the extracted directory |
19 |
> within src_unpack, to avoid mentioning the $author, $commitid and |
20 |
> modifying ${S}. |
21 |
> |
22 |
> """ |
23 |
> SRC_URI="https://github.com/sargon/${PN}/tarball/${P/-srg/} -> |
24 |
> ${P}.tar.gz" |
25 |
> |
26 |
> src_unpack() { |
27 |
> unpack ${A} |
28 |
> mv *-${PN}-* ${P} || die |
29 |
> } |
30 |
> """ |
31 |
> |
32 |
> I wonder if others have similar workarounds? |
33 |
> |
34 |
> And does this src_unpack qualify for an eclass or being added to an |
35 |
> existing one, to avoid code replication? |
36 |
> |
37 |
> Maybe fetch filename " -> ${P}.tar.gz" can be mangled into SRC_URI by |
38 |
> this eclass/function, too. |
39 |
> |
40 |
> Michael |
41 |
> |
42 |
> - -- |
43 |
> Gentoo Dev |
44 |
> http://xmw.de/ |
45 |
> |
46 |
> -----BEGIN PGP SIGNATURE----- |
47 |
> Version: GnuPG v2.0.17 (GNU/Linux) |
48 |
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ |
49 |
> |
50 |
> iF4EAREIAAYFAk/V9YwACgkQknrdDGLu8JBbzgD/aZ0USZEnfa2bQaoHOjKglMN/ |
51 |
> BJHuAOv0At95B4ARSXkA/A79qARFSCCAryjv55A1f6+3LafaRJlP0QKLp+zHoKvq |
52 |
> =W1YG |
53 |
> -----END PGP SIGNATURE----- |
54 |
> |
55 |
|
56 |
This sounds like what the vcs-snapshot[1] eclass is for? |
57 |
|
58 |
1 . http://devmanual.gentoo.org/eclass-reference/vcs-snapshot.eclass/index.html |
59 |
|
60 |
-- |
61 |
Ian Whyman |
62 |
www.gentoo.org |