From 2625d8d9f4316ef376d4e27fbe36a1e5d35db9d3 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Fri, 7 Oct 2005 04:15:20 +0000 Subject: [PATCH] =?utf8?q?make=20sure=20make=5Fdesktop=5Fentry=20returns?= =?utf8?q?=20proper=20error=20code=20from=20doins=20#108309=20by=20Petteri?= =?utf8?q?=20R=C3=A4ty?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- eclass/eutils.eclass | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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 -- 2.26.2