[PC-BSD Commits] r19012 - pcbsd/current/src-sh/pc-metapkgmanager

svn at pcbsd.org svn at pcbsd.org
Mon Sep 10 11:31:00 PDT 2012


Author: kris
Date: 2012-09-10 18:31:00 +0000 (Mon, 10 Sep 2012)
New Revision: 19012

Modified:
   pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager
Log:

Update pc-metapkgmanager, to remove files which fail to resume
from fetch properly, and strip out any duplicates



Modified: pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager
===================================================================
--- pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager	2012-09-10 17:55:02 UTC (rev 19011)
+++ pcbsd/current/src-sh/pc-metapkgmanager/pc-metapkgmanager	2012-09-10 18:31:00 UTC (rev 19012)
@@ -759,7 +759,7 @@
   do
     echo "$pkg" >> /tmp/.pc-meta-sort.$$
   done
-  sort /tmp/.pc-meta-sort.$$ > /tmp/.pc-meta-sort2.$$
+  sort /tmp/.pc-meta-sort.$$ | uniq > /tmp/.pc-meta-sort2.$$
   mv /tmp/.pc-meta-sort2.$$ /tmp/.pc-meta-sort.$$
 
   PKGCOUNT=0
@@ -824,6 +824,10 @@
 	if [ $_err -ne 0 -a $_ftries -gt 0 ] ; then
 		sleep 30
 		_ftries=`expr $_ftries - 1`
+
+		# Remove the local file if we failed
+		if [ -e "${_lf}" ]; then rm "${_lf}"; fi
+
 		get_file "${_rf}" "${_lf}" $_ftries	
 		_err=$?
 	fi



More information about the Commits mailing list