From 9a05692a3a2a02096c51e6ee8ca3a6adfa2f1a8e Mon Sep 17 00:00:00 2001 From: Andres Loeh Date: Wed, 24 Nov 2004 15:05:49 +0000 Subject: [PATCH] * check for existence of configuration directory prior to doing anything in ghc-reregister function --- eclass/ghc-package.eclass | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/eclass/ghc-package.eclass b/eclass/ghc-package.eclass index e0754f8d2a60..087b34de0d89 100644 --- a/eclass/ghc-package.eclass +++ b/eclass/ghc-package.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.4 2004/11/04 14:16:14 kosmikus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/ghc-package.eclass,v 1.5 2004/11/24 15:05:49 kosmikus Exp $ # # Author: Andres Loeh # @@ -101,12 +101,14 @@ ghc-register-pkg() { ghc-reregister() { einfo "Re-adding packages ..." ewarn "This may cause several warnings, but they should be harmless." - pushd $(ghc-confdir) - for conf in *.conf; do - einfo "Processing ${conf} ..." - ghc-register-pkg ${conf} - done - popd + if [ -d "$(ghc-confdir)" ]; then + pushd $(ghc-confdir) + for conf in *.conf; do + einfo "Processing ${conf} ..." + ghc-register-pkg ${conf} + done + popd + fi } # unregisters ... -- 2.26.2