Date: Mon, 9 Nov 2009 08:48:02 +0000 (UTC) From: Doug Barton <dougb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r199071 - user/dougb/portmaster Message-ID: <200911090848.nA98m2BB013818@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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:"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911090848.nA98m2BB013818>