packages: builder - add --upgrade-version

glen glen at pld-linux.org
Fri Aug 20 12:28:11 CEST 2010


Author: glen                         Date: Fri Aug 20 10:28:11 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- add --upgrade-version

---- Files affected:
packages:
   builder (1.625 -> 1.626) 

---- Diffs:

================================================================
Index: packages/builder
diff -u packages/builder:1.625 packages/builder:1.626
--- packages/builder:1.625	Fri Aug 20 12:23:14 2010
+++ packages/builder	Fri Aug 20 12:28:05 2010
@@ -363,6 +363,8 @@
 -u, --try-upgrade   - check version, and try to upgrade package
 -un, --try-upgrade-with-float-version
                     - as above, but allow float version
+					php-pear-Services_Digg/
+--upgrade-version   - upgrade to specified version in try-upgrade
 --use-greed-sources
                     - try download source from tag head if don't find it in
                       current tag
@@ -1439,13 +1441,17 @@
 
 		cd "$PACKAGE_DIR"
 		
-		if [ -n "$FLOAT_VERSION" ]; then
-			TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
+		if [ "$UPGRADE_VERSION" ]; then
+			TNEWVER=$UPGRADE_VERSION
 		else
-			TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
-		fi
+			if [ -n "$FLOAT_VERSION" ]; then
+				TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE -n) || exit 1
+			else
+				TNOTIFY=$($APPDIR/pldnotify.awk ${BE_VERBOSE:+-vDEBUG=1} $SPECFILE) || exit 1
+			fi
 
-		TNEWVER=$(echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }')
+			TNEWVER=$(echo $TNOTIFY | awk '{ match($4,/\[NEW\]/); print $5 }')
+		fi
 
 		if [ -n "$TNEWVER" ]; then
 			TOLDVER=`echo $TNOTIFY | awk '{ print $3; }'`
@@ -2271,6 +2277,8 @@
 			shift;;
 		-u | --try-upgrade )
 			TRY_UPGRADE="1"; shift ;;
+		--upgrade-version )
+			shift; UPGRADE_VERSION="$1"; shift;;
 		-un | --try-upgrade-with-float-version )
 			TRY_UPGRADE="1"; FLOAT_VERSION="1"; shift ;;
 		-v | --verbose )
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/builder?r1=1.625&r2=1.626&f=u



More information about the pld-cvs-commit mailing list