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 16:55:46
Message-Id: 1435250147.bce9e5d6475b8aebbdd5cdf8add8fab29e9d4316.mrueg@gentoo
1 commit: bce9e5d6475b8aebbdd5cdf8add8fab29e9d4316
2 Author: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
3 AuthorDate: Thu Jun 25 16:35:47 2015 +0000
4 Commit: Manuel Rüger <mrueg <AT> gentoo <DOT> org>
5 CommitDate: Thu Jun 25 16:35:47 2015 +0000
6 URL: https://gitweb.gentoo.org/dev/mrueg.git/commit/?id=bce9e5d6
7
8 [eclass] Drop live ebuild detection.
9
10 eclass/github.eclass | 28 +++++++---------------------
11 1 file changed, 7 insertions(+), 21 deletions(-)
12
13 diff --git a/eclass/github.eclass b/eclass/github.eclass
14 index ab5a66f..bb6ff35 100644
15 --- a/eclass/github.eclass
16 +++ b/eclass/github.eclass
17 @@ -34,7 +34,7 @@ esac
18 # @DEFAULT-UNSET
19 # @DESCRIPTION:
20 # Defines if fetched from git ("live") or tarball ("release")
21 -# Use if autodetection via PV fails.
22 +: ${GH_BUILD_TYPE:=release}
23
24 # @ECLASS-VARIABLE: GH_PATCHES
25 # @DEFAULT_UNSET
26 @@ -57,25 +57,11 @@ esac
27
28 inherit eutils
29
30 -if [[ ${PV} != *9999 && ${GH_BUILD_TYPE} == live ]]; then
31 - eqawarn "Uncommon package version for a live ebuild."
32 -fi
33 -
34 -if [[ -z ${GH_BUILD_TYPE} ]]; then
35 - if [[ ${PV} == *9999 ]]; then
36 - _GH_BUILD_TYPE=live
37 - else
38 - _GH_BUILD_TYPE=release
39 - fi
40 -else
41 - _GH_BUILD_TYPE=$GH_BUILD_TYPE
42 -fi
43 -
44 -if [[ ${_GH_BUILD_TYPE} = live ]]; then
45 +if [[ ${GH_BUILD_TYPE} = live ]]; then
46 inherit git-r3
47 fi
48
49 -if [[ ${_GH_BUILD_TYPE} = release ]]; then
50 +if [[ ${GH_BUILD_TYPE} = release ]]; then
51 inherit vcs-snapshot
52 fi
53
54 @@ -83,7 +69,7 @@ HOMEPAGE="https://github.com/${GH_USER}/${GH_REPO}"
55
56 EXPORT_FUNCTIONS src_prepare src_unpack
57
58 -_patch_calc_commit() {
59 +_patch_calc_filesdir() {
60 debug-print-function ${FUNCNAME} "$@"
61
62 local gh_filepatch="$1"
63 @@ -131,7 +117,7 @@ _calculate_patches_uri() {
64 ;;
65 c) _patch_calc_commit "${gh_commit:2}"
66 ;;
67 - p) _patch_calc-pull_request "${gh_commit:2}"
68 + p) _patch_calc_pull-request "${gh_commit:2}"
69 ;;
70 *) die "Wrong patch pattern: ${gh_commit}"
71 ;;
72 @@ -163,7 +149,7 @@ _calculate_live_repo() {
73 }
74
75
76 -case ${_GH_BUILD_TYPE} in
77 +case ${GH_BUILD_TYPE} in
78 live) _calculate_live_repo ;;
79 release) _calculate_src_uri ;;
80 esac
81 @@ -177,7 +163,7 @@ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
82 github_src_unpack() {
83 debug-print-function ${FUNCNAME} "$@"
84
85 - if [[ ${_GH_BUILD_TYPE} = live ]]; then
86 + if [[ ${GH_BUILD_TYPE} = live ]]; then
87 git-r3_src_unpack
88 else
89 vcs-snapshot_src_unpack