Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: scarabeus@g.o
Subject: Re: [gentoo-dev] [RFC] check-reqs.eclass.patch
Date: Wed, 31 Aug 2011 15:29:00
Message-Id: 20110831173001.09eb94f9@pomiocik.lan
In Reply to: Re: [gentoo-dev] [RFC] check-reqs.eclass.patch by "Tomáš Chvátal"
1 > DEPEND="sys-apps/gawk"
2
3 gawk is in the system set. If you really want to DEP on it explicitly,
4 maybe we should create a virtual, as any POSIX-compliant awk will
5 handle this.
6
7 > # Temporary workaround for unset units.
8 > # Backcompat.
9 > [[ "${unit//*([[:digit:]])}" ]] || unit="M"
10 >
11 > case ${unit} in
12 > G) echo "Gibibytes" ;;
13 > M) echo "Mebibytes" ;;
14 > T) echo "Tebibytes" ;;
15 > *)
16 > die "${FUNCNAME}: Unknown unit: ${unit}"
17 > ;;
18 > esac
19 > }
20
21 case ${unit} in
22 [M0-9]) echo "mebibytes" ;;
23 ...
24
25 And yes, they actually shall be written lowercase [1].
26
27 [1]:http://www.bipm.org/en/si/si_brochure/chapter5/5-2.html
28
29 --
30 Best regards,
31 Michał Górny

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies

Subject Author
Re: [gentoo-dev] [RFC] check-reqs.eclass.patch "Tomáš Chvátal" <scarabeus@g.o>