Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-09-01 Thread Tomáš Chvátal
Addressed last bunch of suggestions :) Tom # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.8 2011/08/22 04:46:31 vapier Exp $ # @ECLASS: check-reqs.eclass # @MAINTAINER: #

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Tomáš Chvátal
Thanks for all the pointers, hopefully I addressed all issues raised by both of you :) Good pointer is that we should probably check if the MERGE_TYPE=binary and not check-reqs ram and disk_build in that case. But there is slight problem how to do it in older eapis. Also Michal if you want

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Michał Górny
On Wed, 32 Aug 2011 10:57:08 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: Good pointer is that we should probably check if the MERGE_TYPE=binary and not check-reqs ram and disk_build in that case. But there is slight problem how to do it in older eapis. We simply don't. Life is hard :P.

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Tomáš Chvátal
Dne 31.8.2011 12:14, Michał Górny napsal(a): On Wed, 32 Aug 2011 10:57:08 +0200 Tomáš Chvátalscarab...@gentoo.org wrote: Good pointer is that we should probably check if the MERGE_TYPE=binary and not check-reqs ram and disk_build in that case. But there is slight problem how to do it in older

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Michał Górny
On Wed, 31 Aug 2011 12:32:03 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: gibibytes, mebibytes, tebibytes. I preffer binary units over this fancy standard :) Even our tools return the binary calculated ones not the decadic ones. These are binary units, rather those fancy misnamed binary

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Michael Schreckenbauer
Hi, Am Mittwoch, 31. August 2011, 12:32:03 schrieb Tomáš Chvátal: Hehe same as above Rest I hopefully applied. Lemme know if you find something else. just a user lurking here, but # @FUNCTION: check-reqs_unsattisfied # @DESCRIPTION: # Internal function that inform about check result. # It has

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Tomáš Chvátal
Dne 31.8.2011 14:38, Michał Górny napsal(a): On Wed, 31 Aug 2011 12:32:03 +0200 Tomáš Chvátalscarab...@gentoo.org wrote: gibibytes, mebibytes, tebibytes. I preffer binary units over this fancy standard :) Even our tools return the binary calculated ones not the decadic ones. These are

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Michał Górny
DEPEND=sys-apps/gawk gawk is in the system set. If you really want to DEP on it explicitly, maybe we should create a virtual, as any POSIX-compliant awk will handle this. # Temporary workaround for unset units. # Backcompat. [[ ${unit//*([[:digit:]])} ]] || unit=M

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Tomáš Chvátal
Dne 31.8.2011 17:30, Michał Górny napsal(a): DEPEND=sys-apps/gawk gawk is in the system set. If you really want to DEP on it explicitly, maybe we should create a virtual, as any POSIX-compliant awk will handle this. # Temporary workaround for unset units. # Backcompat.

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Ulrich Mueller
On Wed, 31 Aug 2011, Tomáš Chvátal wrote: [M0-9]) echo mebibytes ;; Anyway addressed :) Please be consistent and change the following occurences too: # Internal function that returns number in megabites. ewarn QA: Assuming Megabytes. And the name of check-reqs_get_megs()

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Alec Warner
On Wed, Aug 31, 2011 at 3:14 AM, Michał Górny mgo...@gentoo.org wrote: On Wed, 32 Aug 2011 10:57:08 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: Good pointer is that we should probably check if the MERGE_TYPE=binary and not check-reqs ram and disk_build in that case. But there is slight

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Ulrich Mueller
On Wed, 31 Aug 2011, Alec Warner wrote: Also it is my understanding that all tokens in $(()) go through expansion, so for instance: $(( 1024 * 1024 * size )) and $(( 1024 * 1024 * ${size})) are equivalent. Is this only in bash4? It's like this since bash 2.05 at least. Do we have a

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-31 Thread Tomáš Chvátal
Dne 31.8.2011 21:03, Ulrich Mueller napsal(a): On Wed, 31 Aug 2011, Alec Warner wrote: Also it is my understanding that all tokens in $(()) go through expansion, so for instance: $(( 1024 * 1024 * size )) and $(( 1024 * 1024 * ${size})) are equivalent. Is this only in bash4? It's like this

[gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-30 Thread Tomáš Chvátal
Hi, I got enough annoyed by check-reqs.eclass using epause and other nasty things so I updated it to do this things: * eclassdoc * use pkg_pretend and pkg_setup phases to run the checks * warn if ebuild use deprecated calls and keep backompat * remove duplicated/unused code * support for

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-30 Thread Tomáš Chvátal
Dne 30.8.2011 09:35, Michał Górny napsal(a): On Tue, 30 Aug 2011 09:11:40 +0200 Tomáš Chvátalscarab...@gentoo.org wrote: @@ -66,80 +52,234 @@ # @ECLASS-VARIABLE: CHECKREQS_MEMORY # @DESCRIPTION: -# How much RAM is needed in MB? +# @DEAULT_UNSET +# How much RAM is needed? Typo. Also,

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-30 Thread Ulrich Mueller
On Tue, 30 Aug 2011, Tomáš Chvátal wrote: CHECKREQS_EXPORTED_FUNCTIONS=pkg_setup case ${EAPI:-0} in 0|1|2|3) ;; 4) CHECKREQS_EXPORTED_FUNCTIONS=${CHECKREQS_EXPORTED_FUNCTIONS} pkg_pretend ;; *) die EAPI=${EAPI} is not supported ;; esac EXPORT_FUNCTIONS

Re: [gentoo-dev] [RFC] check-reqs.eclass.patch

2011-08-30 Thread Michał Górny
On Tue, 30 Aug 2011 10:04:50 +0200 Tomáš Chvátal scarab...@gentoo.org wrote: + [[ -n ${CHECKREQS_DISK_BUILD} ]] \ + check-reqs_disk \ + ${T} \ + ${CHECKREQS_DISK_BUILD} Why not WORKDIR? I thought workdir is present later than $T plus it