Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 24 Dec 2010 06:41:30 +0000 (UTC)
From:      Doug Barton <dougb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-user@freebsd.org
Subject:   svn commit: r216686 - user/dougb/portmaster
Message-ID:  <201012240641.oBO6fUV0081213@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dougb
Date: Fri Dec 24 06:41:29 2010
New Revision: 216686
URL: http://svn.freebsd.org/changeset/base/216686

Log:
  Error handling for INDEX fetch

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Dec 24 04:55:56 2010	(r216685)
+++ user/dougb/portmaster/portmaster	Fri Dec 24 06:41:29 2010	(r216686)
@@ -755,8 +755,10 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
 			[ -n "$index_time" ] && {
 				$index_fetch 2>/dev/null && do_index_fetch=no_index_fetch; }
 
-			[ "$do_index_fetch" = yes_index_fetch ] && {
-				pm_sv 'Fetching new INDEX file'; $PM_SU_CMD $index_fetch; }
+			if [ "$do_index_fetch" = yes_index_fetch ]; then
+				pm_sv 'Fetching new INDEX file'
+				$PM_SU_CMD $index_fetch || fail Could not perform $index_fetch
+			fi
 
 			if [ ${index_time:-0} -ne `stat -f '%Um' ${PM_INDEX}.bz2 2>/dev/null` ]; then
 				temp_index=`pm_mktemp index`



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201012240641.oBO6fUV0081213>