Gentoo Archives: gentoo-commits

From: "Manuel Rüger" <mrueg@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] dev/mrueg:master commit in: eclass/
Date: Thu, 25 Jun 2015 11:03:28
Message-Id: 1435230190.d76b5aaf4e03efd2c96c7226584a7a584f4241c7.mrueg@gentoo
1 commit: d76b5aaf4e03efd2c96c7226584a7a584f4241c7
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 25 11:03:10 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 25 11:03:10 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=d76b5aaf
7
8 [eclass] Fix live ebuild logic.
9
10 eclass/github.eclass | 19 +++++++++++++------
11 1 file changed, 13 insertions(+), 6 deletions(-)
12
13 diff --git a/eclass/github.eclass b/eclass/github.eclass
14 index d4691ef..6c302f5 100644
15 --- a/eclass/github.eclass
16 +++ b/eclass/github.eclass
17 @@ -31,9 +31,10 @@ esac
18 : ${GH_REPO:=${PN}}
19
20 # @ECLASS-VARIABLE: GH_BUILD_TYPE
21 +# @DEFAULT-UNSET
22 # @DESCRIPTION:
23 -# Live ebuilds use "live" here.
24 -: ${GH_BUILD_TYPE:=default}
25 +# Defines if fetched from git ("live") or tarball ("release")
26 +# Use if autodetection via PV fails.
27
28 # @ECLASS-VARIABLE: GH_PATCHES
29 # @DEFAULT_UNSET
30 @@ -52,15 +53,21 @@ esac
31
32 inherit eutils
33
34 -if [[ ${PV} == *9999 ]]; then
35 - GH_BUILD_TYPE=live
36 +if [[ -z ${GH_BUILD_TYPE} ]]; then
37 + if [[ ${PV} == *9999 ]]; then
38 + _GH_BUILD_TYPE=live
39 + else
40 + _GH_BUILD_TYPE=release
41 + fi
42 +else
43 + _GH_BUILD_TYPE=$GH_BUILD_TYPE
44 fi
45
46 if [[ ${GH_BUILD_TYPE} = live ]]; then
47 inherit git-r3
48 fi
49
50 -if [[ ${GH_BUILD_TYPE} = default ]]; then
51 +if [[ ${GH_BUILD_TYPE} = release ]]; then
52 inherit vcs-snapshot
53 fi
54
55 @@ -115,7 +122,7 @@ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
56 github_src_unpack() {
57 debug-print-function ${FUNCNAME} "$@"
58
59 - if [[ ${GH_BUILD_TYPE} = live ]]; then
60 + if [[ ${_GH_BUILD_TYPE} = live ]]; then
61 git-r3_src_unpack
62 else
63 vcs-snapshot_src_unpack