svn commit: r210400 - user/dougb/portmaster

Doug Barton dougb at FreeBSD.org
Fri Jul 23 06:01:31 UTC 2010


Author: dougb
Date: Fri Jul 23 06:01:30 2010
New Revision: 210400
URL: http://svn.freebsd.org/changeset/base/210400

Log:
  If --local-packagedir and ${LOCAL_PACKAGEDIR}/All/${new_port}.tbz exists
  just use it, don't bother dereferencing $LATEST_LINK. This is faster,
  but it also solves the problem recenctly mentioned on -ports where
  packages/Latest/perl links to perl-5.10.x, even with 5.12.x installed and
  the 5.12.x package exists in packages/All

Modified:
  user/dougb/portmaster/portmaster

Modified: user/dougb/portmaster/portmaster
==============================================================================
--- user/dougb/portmaster/portmaster	Fri Jul 23 05:42:49 2010	(r210399)
+++ user/dougb/portmaster/portmaster	Fri Jul 23 06:01:30 2010	(r210400)
@@ -1031,7 +1031,6 @@ if [ -n "$CLEAN_DISTFILES" ]; then
 	safe_exit
 fi
 
-# XXX
 if [ -n "$CLEAN_PACKAGES" ]; then
 	init_packages_var
 
@@ -3175,7 +3174,11 @@ fetch_package () {
 	echo "===>>> Checking package repository for latest available version"
 
 	if [ -n "$LOCAL_PACKAGEDIR" ]; then
-		if [ -z "$PM_INDEX_ONLY" ]; then
+		if [ -r "${LOCAL_PACKAGEDIR}/All/${new_port}.tbz" ]; then
+			local_package=${LOCAL_PACKAGEDIR}/All/${new_port}.tbz
+			latest_pv=${local_package##*/}
+		fi
+		if [ -z "$latest_pv" -a  -z "$PM_INDEX_ONLY" ]; then
 			s=`pm_make -V LATEST_LINK`
 			if [ -r "${LOCAL_PACKAGEDIR}/Latest/${s}.tbz" ]; then
 				local_package=${LOCAL_PACKAGEDIR}/Latest/${s}.tbz
@@ -3185,11 +3188,6 @@ fetch_package () {
 				[ -n "$PM_VERBOSE" ] &&
 		echo "===>>> No local package for $new_port exists, attempting fetch"
 			fi
-		else
-			if [ -r "${LOCAL_PACKAGEDIR}/All/${new_port}.tbz" ]; then
-				local_package=${LOCAL_PACKAGEDIR}/All/${new_port}.tbz
-				latest_pv=${local_package##*/}
-			fi
 		fi
 	fi
 


More information about the svn-src-user mailing list