diff options
author | Jeroen Roovers <jer@gentoo.org> | 2011-06-04 17:34:01 +0000 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2011-06-04 17:34:01 +0000 |
commit | 224f80b8b790973df992a1573daf712abb993181 (patch) | |
tree | 92398f2cc3eaeff602c18fe7cc464722b2fce2fc /app-admin | |
parent | Removed deprecated policies (diff) | |
download | gentoo-2-224f80b8b790973df992a1573daf712abb993181.tar.gz gentoo-2-224f80b8b790973df992a1573daf712abb993181.tar.bz2 gentoo-2-224f80b8b790973df992a1573daf712abb993181.zip |
Add a simple linguas counter. Die() when removing lingua fails.
(Portage version: 2.2.0_alpha37/cvs/Linux x86_64)
Diffstat (limited to 'app-admin')
-rw-r--r-- | app-admin/sysstat/ChangeLog | 5 | ||||
-rw-r--r-- | app-admin/sysstat/sysstat-10.0.1.ebuild | 17 |
2 files changed, 17 insertions, 5 deletions
diff --git a/app-admin/sysstat/ChangeLog b/app-admin/sysstat/ChangeLog index c6d3094d375e..57d36f41511b 100644 --- a/app-admin/sysstat/ChangeLog +++ b/app-admin/sysstat/ChangeLog @@ -1,6 +1,9 @@ # ChangeLog for app-admin/sysstat # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sysstat/ChangeLog,v 1.195 2011/06/03 14:11:10 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysstat/ChangeLog,v 1.196 2011/06/04 17:34:01 jer Exp $ + + 04 Jun 2011; Jeroen Roovers <jer@gentoo.org> sysstat-10.0.1.ebuild: + Add a simple linguas counter. Die() when removing lingua fails. *sysstat-10.0.1 (03 Jun 2011) diff --git a/app-admin/sysstat/sysstat-10.0.1.ebuild b/app-admin/sysstat/sysstat-10.0.1.ebuild index 60b80c2210d8..9ca54b2ff199 100644 --- a/app-admin/sysstat/sysstat-10.0.1.ebuild +++ b/app-admin/sysstat/sysstat-10.0.1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-admin/sysstat/sysstat-10.0.1.ebuild,v 1.1 2011/06/03 14:11:10 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-admin/sysstat/sysstat-10.0.1.ebuild,v 1.2 2011/06/04 17:34:01 jer Exp $ EAPI="2" @@ -37,16 +37,25 @@ RDEPEND=" DEPEND="${RDEPEND} nls? ( sys-devel/gettext )" +sysstat_count() { + echo ${#} +} + src_prepare() { epatch "${FILESDIR}/${P}-nls.patch" - local lingua NLSDIR="${S}/nls" + local po_count li_count lingua NLSDIR="${S}/nls" + + po_count=$(sysstat_count ${NLSDIR}/*.po) + li_count=$(sysstat_count ${SYSSTAT_LINGUAS}) + [[ ${po_count} = ${li_count} ]] \ + || die "Number of LINGUAS does not match number of .po files" + einfo "Keeping these locales: ${LINGUAS}." for lingua in ${SYSSTAT_LINGUAS}; do if ! use linguas_${lingua}; then - rm -f "${NLSDIR}/${lingua}.po" + rm -f "${NLSDIR}/${lingua}.po" || die fi done - epatch "${FILESDIR}"/${PN}-10.0.0-flags.patch } |