/[gentoo-x86]/eclass/check-reqs.eclass
Gentoo

Diff of /eclass/check-reqs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.14 Revision 1.15
1# Copyright 1999-2014 Gentoo Foundation 1# Copyright 1999-2014 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.14 2014/03/28 15:08:16 ulm Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.15 2014/03/29 16:06:44 ulm Exp $
4 4
5# @ECLASS: check-reqs.eclass 5# @ECLASS: check-reqs.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# QA Team <qa@gentoo.org> 7# QA Team <qa@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
89# It should be run in both phases to ensure condition changes between 89# It should be run in both phases to ensure condition changes between
90# pkg_pretend and pkg_setup won't affect the build. 90# pkg_pretend and pkg_setup won't affect the build.
91check-reqs_pkg_setup() { 91check-reqs_pkg_setup() {
92 debug-print-function ${FUNCNAME} "$@" 92 debug-print-function ${FUNCNAME} "$@"
93 93
94 [[ ${MERGE_TYPE} == binary ]] && return
95
96 check-reqs_prepare 94 check-reqs_prepare
97 check-reqs_run 95 check-reqs_run
98 check-reqs_output 96 check-reqs_output
99} 97}
100 98
130 debug-print-function ${FUNCNAME} "$@" 128 debug-print-function ${FUNCNAME} "$@"
131 129
132 # some people are *censored* 130 # some people are *censored*
133 unset CHECKREQS_FAILED 131 unset CHECKREQS_FAILED
134 132
133 # use != in test, because MERGE_TYPE only exists in EAPI 4 and later
134 if [[ ${MERGE_TYPE} != binary ]]; then
135 [[ -n ${CHECKREQS_MEMORY} ]] && \ 135 [[ -n ${CHECKREQS_MEMORY} ]] && \
136 check-reqs_memory \ 136 check-reqs_memory \
137 ${CHECKREQS_MEMORY} 137 ${CHECKREQS_MEMORY}
138 138
139 [[ -n ${CHECKREQS_DISK_BUILD} ]] && \ 139 [[ -n ${CHECKREQS_DISK_BUILD} ]] && \
140 check-reqs_disk \ 140 check-reqs_disk \
141 "${T}" \ 141 "${T}" \
142 "${CHECKREQS_DISK_BUILD}" 142 "${CHECKREQS_DISK_BUILD}"
143 fi
143 144
145 if [[ ${MERGE_TYPE} != buildonly ]]; then
144 [[ -n ${CHECKREQS_DISK_USR} ]] && \ 146 [[ -n ${CHECKREQS_DISK_USR} ]] && \
145 check-reqs_disk \ 147 check-reqs_disk \
146 "${EROOT}/usr" \ 148 "${EROOT}/usr" \
147 "${CHECKREQS_DISK_USR}" 149 "${CHECKREQS_DISK_USR}"
148 150
149 [[ -n ${CHECKREQS_DISK_VAR} ]] && \ 151 [[ -n ${CHECKREQS_DISK_VAR} ]] && \
150 check-reqs_disk \ 152 check-reqs_disk \
151 "${EROOT}/var" \ 153 "${EROOT}/var" \
152 "${CHECKREQS_DISK_VAR}" 154 "${CHECKREQS_DISK_VAR}"
155 fi
153} 156}
154 157
155# @FUNCTION: check-reqs_get_mebibytes 158# @FUNCTION: check-reqs_get_mebibytes
156# @DESCRIPTION: 159# @DESCRIPTION:
157# Internal function that returns number in mebibytes. 160# Internal function that returns number in mebibytes.
348 # @INTERNAL 351 # @INTERNAL
349 # If set the checks failed and eclass should abort the build. 352 # If set the checks failed and eclass should abort the build.
350 # Internal, do not set yourself. 353 # Internal, do not set yourself.
351 CHECKREQS_FAILED="true" 354 CHECKREQS_FAILED="true"
352} 355}
353

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

  ViewVC Help
Powered by ViewVC 1.1.20