ulm         14/03/28 15:08:16

  Modified:             check-reqs.eclass ChangeLog
  Log:
  Output binary prefixes for units according to IEC 80000-13, as calculations 
are 1024 based. Fix documentation of check-reqs_get_unit function, and other 
minor fixes.

Revision  Changes    Path
1.14                 eclass/check-reqs.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/check-reqs.eclass?rev=1.14&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/check-reqs.eclass?rev=1.14&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/check-reqs.eclass?r1=1.13&r2=1.14

Index: check-reqs.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- check-reqs.eclass   19 Oct 2012 03:35:15 -0000      1.13
+++ check-reqs.eclass   28 Mar 2014 15:08:16 -0000      1.14
@@ -1,6 +1,6 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2014 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.13 2012/10/19 
03:35:15 patrick Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.14 2014/03/28 
15:08:16 ulm Exp $
 
 # @ECLASS: check-reqs.eclass
 # @MAINTAINER:
@@ -155,7 +155,7 @@
 # @FUNCTION: check-reqs_get_mebibytes
 # @DESCRIPTION:
 # Internal function that returns number in mebibytes.
-# Converts from 1G=1024 or 1T=1048576
+# Returns 1024 for 1G or 1048576 for 1T.
 check-reqs_get_mebibytes() {
        debug-print-function ${FUNCNAME} "$@"
 
@@ -176,8 +176,8 @@
 
 # @FUNCTION: check-reqs_get_number
 # @DESCRIPTION:
-# Internal function that returns number without the unit.
-# Converts from 1G=1 or 150T=150.
+# Internal function that returns the numerical value without the unit.
+# Returns "1" for "1G" or "150" for "150T".
 check-reqs_get_number() {
        debug-print-function ${FUNCNAME} "$@"
 
@@ -190,7 +190,7 @@
        # Backcompat.
        if [[ ${size} == ${1} ]]; then
                ewarn "QA: Package does not specify unit for the size check"
-               ewarn "QA: Assuming megabytes."
+               ewarn "QA: Assuming mebibytes."
                ewarn "QA: File bug against the package. It should specify the 
unit."
        fi
 
@@ -199,8 +199,8 @@
 
 # @FUNCTION: check-reqs_get_unit
 # @DESCRIPTION:
-# Internal function that returns number without the unit.
-# Converts from 1G=1 or 150T=150.
+# Internal function that return the unit without the numerical value.
+# Returns "GiB" for "1G" or "TiB" for "150T".
 check-reqs_get_unit() {
        debug-print-function ${FUNCNAME} "$@"
 
@@ -209,9 +209,9 @@
        local unit=${1:(-1)}
 
        case ${unit} in
-               G) echo "gigabytes" ;;
-               [M0-9]) echo "megabytes" ;;
-               T) echo "terabytes" ;;
+               G) echo "GiB" ;;
+               [M0-9]) echo "MiB" ;;
+               T) echo "TiB" ;;
                *)
                        die "${FUNCNAME}: Unknown unit: ${unit}"
                ;;



1.1185               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1185&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1185&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1184&r2=1.1185

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1184
retrieving revision 1.1185
diff -u -r1.1184 -r1.1185
--- ChangeLog   26 Mar 2014 13:12:39 -0000      1.1184
+++ ChangeLog   28 Mar 2014 15:08:16 -0000      1.1185
@@ -1,6 +1,11 @@
 # ChangeLog for eclass directory
 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1184 2014/03/26 
13:12:39 kensington Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1185 2014/03/28 
15:08:16 ulm Exp $
+
+  28 Mar 2014; Ulrich Müller <[email protected]> check-reqs.eclass:
+  Output binary prefixes for units according to IEC 80000-13, as calculations
+  are 1024 based. Fix documentation of check-reqs_get_unit function, and other
+  minor fixes.
 
   26 Mar 2014; Michael Palimaka <[email protected]> cmake-utils.eclass:
   Fix typo in prefix block by Christoph Junghans <[email protected]>.




Reply via email to