svn commit: r199071 - user/dougb/portmaster

Doug Barton dougb at FreeBSD.org
Mon Nov 9 08:48:02 UTC 2009


Author: dougb
Date: Mon Nov  9 08:48:01 2009
New Revision: 199071
URL: http://svn.freebsd.org/changeset/base/199071

Log:
  1. Be more robust in choosing the string to search for:
  	a. If there is a '.' in PKGNAME use ${PKGNAME%%\.*} to handle
  	   ports like lang/tcl* whose LATEST_LINK is different.
  	   This also saves an external call to make in the common case
  	b. If there is no '.', then use LATEST_LINK.
  2. Change the grep for finding the latest package version to pick from
  the anchor tag just like the truncation code in the previous commit

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Mon Nov  9 08:34:44 2009	(r199070)
+++ user/dougb/portmaster/portmaster	Mon Nov  9 08:48:01 2009	(r199071)
@@ -2293,9 +2293,13 @@ if [ -n "$PM_PACKAGES" ]; then
 #echo ''
 
 	[ -n "$PM_VERBOSE" ] && echo "===>>> Checking package repository"
-	latest_link=`pm_make -V LATEST_LINK`
-	latest_pv=`fetch -q -o - ${sitepath} 2>/dev/null | grep ">$latest_link"`
-	unset latest_link
+
+	case "$new_port" in
+	*\.*)	s=${new_port%%\.*} ;;
+	*)	s=`pm_make -V LATEST_LINK` ;;
+	esac
+	latest_pv=`fetch -q -o - ${sitepath} 2>/dev/null | grep "href=\"${s}"`
+	unset s
 
 	if [ -z "$latest_pv" ]; then
 		echo "===>>> Package and/or archive not found at:"


More information about the svn-src-user mailing list