  	if grep -q DEPORIGIN $pdb/$new_port/+CONTENTS; then
  		echo "===>>> Updating dependencies for $new_port to match installed versions"
  		update_contents $pdb/$new_port/+CONTENTS
-@@ -3879,27 +4105,29 @@
+@@ -3879,27 +4108,29 @@
  	echo ''
  fi
  

 				if [ -n "$confl_p" ]; then
 					confl_p=${confl_p%% *}
 					echo ''
@@ -2601,6 +2771,10 @@
 		done
 
 		for dep in $build_only_dl_g; do
+			if [ -n "$use_pkgng" ]; then
+				[ "`pkg query "%?r" $dep`" = "0" ] || temp_bodlg="$temp_bodlg $dep"
+				continue
+			fi
 			grep -q "@comment DEPORIGIN:${dep#$pd/}$" $pdb/*/+CONTENTS ||
 				temp_bodlg="$temp_bodlg $dep"
 		done
@@ -2635,7 +2809,14 @@
 	echo "===>>> Begin $verb ports that depend on $PM_URB_IPORTS"
 	echo ''
 

 		fi
 		[ -n "$ro_upg_port" ] && ro_opd=`origin_from_pdb $ro_upg_port`
 	esac
@@ -3525,7 +3730,12 @@
 		pm_v "===>>> Available package ($latest_pv) matches the current version"
 	elif [ -n "$latest_pv" -a -n "$PM_PACKAGES_NEWER" ]; then
 		if [ -n "$upg_port" ]; then
