svn commit: r241090 - user/dougb/portmaster

Doug Barton dougb at FreeBSD.org
Mon Oct 1 08:32:06 UTC 2012


Author: dougb
Date: Mon Oct  1 08:32:05 2012
New Revision: 241090
URL: http://svn.freebsd.org/changeset/base/241090

Log:
  Due to improvements in the efficiency of portmaster's method of killing
  background processes when trap'ing, plus the declining quality of ports
  generally, when the background process that reads the distinfo files
  encountered a fatal error (which they have been doing more frequently of
  late), the resulting call to fail() would end up neatly killing all of
  that parent's background fetch processes as well.
  
  Fix that problem by not making the disruption in read_distinfos() fatal
  unless it's being used for --clean-distfiles. All the other calls to this
  function are run in the background for the distfile gathering process, and
  a missing file in that list is an inconvenience at worst.

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Oct  1 06:48:59 2012	(r241089)
+++ user/dougb/portmaster/portmaster	Mon Oct  1 08:32:05 2012	(r241090)
@@ -1188,7 +1188,18 @@ read_distinfos () {
 		else
 			pm_cd $origin || continue
 			distinfo=`pm_make -V DISTINFO_FILE`
-			[ -n "$distinfo" ] || fail "No DISTINFO_FILE in $origin"
+
+			# Do not make this error fatal unless using
+			# --clean-distfiles. This will prevent accidentally
+			# killing other background processes when running
+			# in the background itself.
+			if [ -z "$distinfo" ]; then
+				if [ -z "$CLEAN_DISTFILES" ]; then
+					continue
+				else
+					fail "No DISTINFO_FILE in $origin"
+				fi
+			fi
 		fi
 
 		if [ -s "$distinfo" ]; then


More information about the svn-src-user mailing list