  	esac
  
  	if [ -z "$portdir" -a -z "$upg_port" ]; then
-@@ -3015,11 +3109,20 @@
+@@ -3015,11 +3114,20 @@
  
  	case "$arg2" in
  	*/*)	ro_opd=$arg2 ; ro_upg_port=`iport_from_origin $ro_opd` ;;

 			\<)	use_package=up_newer
 				pm_v "===>>> Available package ($latest_pv)"
 				pm_v "       is newer than installed ($upg_port)" ;;
@@ -3526,7 +3634,12 @@
 			pm_v "===>>> There is a package available ($latest_pv)"
 		fi
 	elif [ -n "$latest_pv" ]; then

 			esac
 
 			[ -z "$do_update" ] && {
@@ -1682,6 +1766,11 @@
 	fi
 
 	pm_cd $pkgdir || fail "Cannot cd into $pkgdir to create a package"
+	if [ -z "${use_pkgng}" ]; then
+		pm_pkg_create="pkg_create -b"
+	else
+		pm_pkg_create="pkg create "
+	fi
 	if $PM_SU_CMD pkg_create -b $2; then
 		if [ "$1" = "$pbu" ]; then
 			if [ -n "$BACKUP" ]; then
@@ -2224,7 +2313,12 @@
 			fail "No entry for $origin in $PM_INDEX"
 	fi
 
