Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Subject: [gentoo-dev] RFC: an eclass for github snapshots?
Date: Mon, 30 May 2011 06:28:38
Message-Id: 20110530082754.71b5d04d@pomiocik.lan
1 Hello,
2
3 Right now, a quick 'grep -l github.*tarball' shows that there are about
4 147 ebuilds in portage using github snapshots. This evaluates to 83
5 different packages.
6
7 The problem with github is that it suffixes the tarballs with
8 a complete git commit id. This means that the `S' variable
9 in the ebuild needs to refer to a long hash changing randomly. Right
10 now, the problem is handled in a number of ways:
11
12 1) (from app-admin/rudy)
13
14 S="${WORKDIR}/solutious-${PN}-*"
15
16 I'm surprised if that actually works. I'd say that seems not
17 PMS-compliant but in fact PMS seems to almost not mention S.
18
19 2) (app-emacs/calfw and suggested solution for Sunrise)
20
21 src_unpack() {
22 unpack ${A}
23 mv kiwanami-emacs-calfw-* ${P} || die
24 }
25
26 3) (app-misc/bgrep)
27
28 GITHUB_USER="tmbinc"
29 GITHUB_HASH="49b098be9548d174023ad05c10f6af9d02b8e18e"
30 MY_P="${GITHUB_USER}-${PN}-${GITHUB_HASH:0:7}"
31 S="${WORKDIR}/${MY_P}"
32
33 4) (app-misc/tmux-mem-cpu-load)
34
35 src_prepare() {
36 cd "${WORKDIR}"/thewtex-${PN}-*
37 S=$(pwd)
38 }
39
40
41 What I'd like to do is creating a small github.eclass, encapsulating
42 a common, nice way of handling the S issue. I guess the best solution
43 would be to git with something like 2) above, with the eclass providing
44 github_src_unpack() for EAPIs 2+.
45
46 Maybe the eclass could be extended to support other kinds of snapshots.
47 I'm not sure if there aren't other services providing snapshots similar
48 to github.
49
50 --
51 Best regards,
52 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
[gentoo-dev] Re: RFC: an eclass for github snapshots? "Diego Elio Pettenò" <flameeyes@×××××.com>