From: Mike Frysinger Date: Mon, 11 Dec 2006 00:16:28 +0000 (+0000) Subject: sanitize $PN into bash form #131552 by Martin Väth X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2f3f26a2732b68cf52d807a711761eddb3dcec90;p=gentoo.git sanitize $PN into bash form #131552 by Martin Väth --- diff --git a/eclass/cvs.eclass b/eclass/cvs.eclass index 8b8eb1b34c59..8051776033f5 100644 --- a/eclass/cvs.eclass +++ b/eclass/cvs.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.67 2006/12/11 00:11:46 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/cvs.eclass,v 1.68 2006/12/11 00:16:28 vapier Exp $ # # Maintainer: vapier@gentoo.org (and anyone who wants to help) @@ -488,7 +488,8 @@ cvs_src_unpack() { ECVS_LOCALNAME="$ECVS_MODULE" fi - local offline_pkg_var="ECVS_OFFLINE_${PN}" + local sanitized_pn=$(echo "${PN}" | LC_ALL=C sed -e 's:[^A-Za-z0-9_]:_:g') + local offline_pkg_var="ECVS_OFFLINE_${sanitized_pn}" if [ "${!offline_pkg_var}" == "1" -o "$ECVS_OFFLINE" == "1" -o "$ECVS_SERVER" == "offline" ]; then # We're not required to fetch anything; the module already # exists and shouldn't be updated.