From 809801b6a385b4650782ccdec9f836e88475e7ce Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 7 Oct 2005 04:15:20 +0000 Subject: make sure make_desktop_entry returns proper error code from doins #108309 by Petteri Räty MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- eclass/eutils.eclass | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'eclass/eutils.eclass') diff --git a/eclass/eutils.eclass b/eclass/eutils.eclass index d9b8f93454a1..85e28ecde2e5 100644 --- a/eclass/eutils.eclass +++ b/eclass/eutils.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.203 2005/09/27 12:38:56 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/eutils.eclass,v 1.204 2005/10/07 04:15:20 vapier Exp $ # # Author: Martin Schlemmer # @@ -495,11 +495,11 @@ enewuser() { die "${eshell} does not exist" fi else - for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null; do - [[ -x ${ROOT}${shell} ]] && break; + for shell in /sbin/nologin /usr/sbin/nologin /bin/false /usr/bin/false /dev/null ; do + [[ -x ${ROOT}${shell} ]] && break done - if [[ ${shell} == "/dev/null" ]]; then + if [[ ${shell} == "/dev/null" ]] ; then eerror "Unable to identify the shell to use" die "Unable to identify the shell to use" fi @@ -858,10 +858,12 @@ Path=${path} Icon=${icon} Categories=Application;${type};" > "${desktop}" - insinto /usr/share/applications - doins "${desktop}" - - return 0 + ( + # wrap the env here so that the 'insinto' call + # doesn't corrupt the env of the caller + insinto /usr/share/applications + doins "${desktop}" + ) } # Make a GDM/KDM Session file -- cgit v1.2.3-65-gdbad