Gentoo Archives: gentoo-dev

From: "Tomáš Chvátal" <scarabeus@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [RFC] check-reqs.eclass.patch
Date: Wed, 31 Aug 2011 10:32:53
Message-Id: 4E5E0DA3.7070607@gentoo.org
In Reply to: Re: [gentoo-dev] [RFC] check-reqs.eclass.patch by "Michał Górny"
1 Dne 31.8.2011 12:14, Michał Górny napsal(a):
2 > On Wed, 32 Aug 2011 10:57:08 +0200
3 > Tomáš Chvátal<scarabeus@g.o> wrote:
4 >
5 >> Good pointer is that we should probably check if the
6 >> MERGE_TYPE=binary and not check-reqs ram and disk_build in that case.
7 >> But there is slight problem how to do it in older eapis.
8 >
9 > We simply don't. Life is hard :P.
10 Meh in that case i will make it same on all eapis and just won't check
11 for that :)
12
13 > gibibytes, mebibytes, tebibytes.
14 >
15 I preffer binary units over this fancy standard :)
16 Even our tools return the binary calculated ones not the decadic ones.
17
18 >
19 >> actual_memory=$(sed -n -e '/MemTotal:/s/^[^:]*:
20 >> *\([0-9]\+\) kB/\1/p' \ /proc/meminfo)
21 >
22 > awk '/MemTotal/ { print $2 }' /proc/meminfo
23 Just raw copy from old eclass, didn't feel like updating it, but since
24 you did it I incorporated it :)
25 >
26 >> space_megs=$(df -Pm ${1} 2>/dev/null | sed -n \
27 >> '$s/\(\S\+\s\+\)\{3\}\([0-9]\+\).*/\2/p' 2>/dev/null)
28 >
29 > OMFG.
30 >
31 > space_megs=$(df -Pm "${1}" 2>/dev/null | awk 'FNR == 2 {print $4}')
32 >
33 > I guess.
34 Hehe same as above
35
36
37 Rest I hopefully applied. Lemme know if you find something else.

Attachments

File name MIME type
check-reqs.eclass text/plain

Replies

Subject Author
Re: [gentoo-dev] [RFC] check-reqs.eclass.patch "Michał Górny" <mgorny@g.o>
Re: [gentoo-dev] [RFC] check-reqs.eclass.patch Michael Schreckenbauer <grimlog@×××.de>