The current test for MERGE_TYPE in check-reqs_pkg_setup suppresses
also the CHECKREQS_DISK_{USR,VAR} checks which are relevant for binary
installs. Move the test to check-reqs_run().

Also, don't check install disk space requirements if building a binpkg
without installing it.


--- check-reqs.eclass   19 Oct 2012 03:35:15 -0000      1.13
+++ check-reqs.eclass   27 Mar 2014 22:27:27 -0000
@@ -91,8 +91,6 @@
 check-reqs_pkg_setup() {
        debug-print-function ${FUNCNAME} "$@"
 
-       [[ ${MERGE_TYPE} == binary ]] && return
-
        check-reqs_prepare
        check-reqs_run
        check-reqs_output
@@ -132,24 +130,29 @@
        # some people are *censored*
        unset CHECKREQS_FAILED
 
-       [[ -n ${CHECKREQS_MEMORY} ]] && \
-               check-reqs_memory \
-                       ${CHECKREQS_MEMORY}
-
-       [[ -n ${CHECKREQS_DISK_BUILD} ]] && \
-               check-reqs_disk \
-                       "${T}" \
-                       "${CHECKREQS_DISK_BUILD}"
-
-       [[ -n ${CHECKREQS_DISK_USR} ]] && \
-               check-reqs_disk \
-                       "${EROOT}/usr" \
-                       "${CHECKREQS_DISK_USR}"
-
-       [[ -n ${CHECKREQS_DISK_VAR} ]] && \
-               check-reqs_disk \
-                       "${EROOT}/var" \
-                       "${CHECKREQS_DISK_VAR}"
+                       # use != in test, because MERGE_TYPE only exists in 
EAPI 4 and later
+       if [[ ${MERGE_TYPE} != binary ]]; then
+               [[ -n ${CHECKREQS_MEMORY} ]] && \
+                       check-reqs_memory \
+                               ${CHECKREQS_MEMORY}
+
+               [[ -n ${CHECKREQS_DISK_BUILD} ]] && \
+                       check-reqs_disk \
+                               "${T}" \
+                               "${CHECKREQS_DISK_BUILD}"
+       fi
+
+       if [[ ${MERGE_TYPE} != buildonly ]]; then
+               [[ -n ${CHECKREQS_DISK_USR} ]] && \
+                       check-reqs_disk \
+                               "${EROOT}/usr" \
+                               "${CHECKREQS_DISK_USR}"
+
+               [[ -n ${CHECKREQS_DISK_VAR} ]] && \
+                       check-reqs_disk \
+                               "${EROOT}/var" \
+                               "${CHECKREQS_DISK_VAR}"
+       fi
 }
 
 # @FUNCTION: check-reqs_get_mebibytes

Attachment: pgpNBYL3iNYTF.pgp
Description: PGP signature

Reply via email to