public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michał Górny" <mgorny@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Subject: [gentoo-dev] RFC: an eclass for github snapshots?
Date: Mon, 30 May 2011 08:27:54 +0200	[thread overview]
Message-ID: <20110530082754.71b5d04d@pomiocik.lan> (raw)

[-- Attachment #1: Type: text/plain, Size: 1470 bytes --]

Hello,

Right now, a quick 'grep -l github.*tarball' shows that there are about
147 ebuilds in portage using github snapshots. This evaluates to 83
different packages.

The problem with github is that it suffixes the tarballs with
a complete git commit id. This means that the `S' variable
in the ebuild needs to refer to a long hash changing randomly. Right
now, the problem is handled in a number of ways:

1) (from app-admin/rudy)

S="${WORKDIR}/solutious-${PN}-*"

I'm surprised if that actually works. I'd say that seems not
PMS-compliant but in fact PMS seems to almost not mention S.

2) (app-emacs/calfw and suggested solution for Sunrise)

src_unpack() {
	unpack ${A}
	mv kiwanami-emacs-calfw-* ${P} || die
}

3) (app-misc/bgrep)

GITHUB_USER="tmbinc"
GITHUB_HASH="49b098be9548d174023ad05c10f6af9d02b8e18e"
MY_P="${GITHUB_USER}-${PN}-${GITHUB_HASH:0:7}"
S="${WORKDIR}/${MY_P}"

4) (app-misc/tmux-mem-cpu-load)

src_prepare() {
	cd "${WORKDIR}"/thewtex-${PN}-*
	S=$(pwd)
}


What I'd like to do is creating a small github.eclass, encapsulating
a common, nice way of handling the S issue. I guess the best solution
would be to git with something like 2) above, with the eclass providing
github_src_unpack() for EAPIs 2+.

Maybe the eclass could be extended to support other kinds of snapshots.
I'm not sure if there aren't other services providing snapshots similar
to github.

-- 
Best regards,
Michał Górny

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 316 bytes --]

             reply	other threads:[~2011-05-30  6:28 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-30  6:27 Michał Górny [this message]
2011-05-30  9:35 ` [gentoo-dev] Re: RFC: an eclass for github snapshots? Diego Elio Pettenò
2011-05-30 11:21   ` Ulrich Mueller
2011-05-30 11:44     ` Diego Elio Pettenò
2011-06-07 14:17     ` Donnie Berkholz
2011-06-07 18:16       ` Ulrich Mueller
2011-06-08  6:01         ` Hans de Graaff
2011-06-08  7:17           ` Ulrich Mueller
2011-06-08 15:43             ` Hans de Graaff
2011-06-08 15:50               ` Ciaran McCreesh
2011-06-08 19:20                 ` Hans de Graaff
     [not found] <gY49c-206-11@gated-at.bofh.it>
2012-03-11 17:25 ` [gentoo-dev] " Leho Kraav
2012-03-11 18:15   ` Zac Medico
2012-03-11 18:27   ` Michał Górny
2012-03-12  1:36     ` Ben
2012-03-12  9:47       ` Michał Górny
2012-03-19  8:41         ` Michał Górny

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110530082754.71b5d04d@pomiocik.lan \
    --to=mgorny@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox