/[gentoo-x86]/eclass/check-reqs.eclass
Gentoo

Diff of /eclass/check-reqs.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.12 Revision 1.13
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.12 2012/10/19 02:44:21 patrick Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/check-reqs.eclass,v 1.13 2012/10/19 03:35:15 patrick Exp $
4 4
5# @ECLASS: check-reqs.eclass 5# @ECLASS: check-reqs.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# QA Team <qa@gentoo.org> 7# QA Team <qa@gentoo.org>
8# @AUTHOR: 8# @AUTHOR:
188 188
189 # Check for unset units and warn about them. 189 # Check for unset units and warn about them.
190 # Backcompat. 190 # Backcompat.
191 if [[ ${size} == ${1} ]]; then 191 if [[ ${size} == ${1} ]]; then
192 ewarn "QA: Package does not specify unit for the size check" 192 ewarn "QA: Package does not specify unit for the size check"
193 ewarn "QA: Assuming mebibytes." 193 ewarn "QA: Assuming megabytes."
194 ewarn "QA: File bug against the package. It should specify the unit." 194 ewarn "QA: File bug against the package. It should specify the unit."
195 fi 195 fi
196 196
197 echo ${size} 197 echo ${size}
198} 198}
207 [[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]" 207 [[ -z ${1} ]] && die "Usage: ${FUNCNAME} [size]"
208 208
209 local unit=${1:(-1)} 209 local unit=${1:(-1)}
210 210
211 case ${unit} in 211 case ${unit} in
212 G) echo "gibibytes" ;; 212 G) echo "gigabytes" ;;
213 [M0-9]) echo "mebibytes" ;; 213 [M0-9]) echo "megabytes" ;;
214 T) echo "tebibytes" ;; 214 T) echo "terabytes" ;;
215 *) 215 *)
216 die "${FUNCNAME}: Unknown unit: ${unit}" 216 die "${FUNCNAME}: Unknown unit: ${unit}"
217 ;; 217 ;;
218 esac 218 esac
219} 219}

Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

  ViewVC Help
Powered by ViewVC 1.1.20