 +				PM_URB_LIST="${PM_URB_LIST} ${req_by}"
 +			done
 +		else
-+			for req_by in `pkg query "%rn-%rv" ${origin}`; do
++			while read req_by req_by_o; do
 +				case " $PM_URB_IPORTS" in *" $req_by "*) continue ;; esac
-+				case " $PM_URB_ORIGINS" in *" `origin_from_pdb $req_by` "*) continue ;; esac
++				case " $PM_URB_ORIGINS" in *" $req_by_o "*) continue ;; esac
 +				PM_URB_LIST="${PM_URB_LIST} ${req_by}"
-+			done
++			done << EOF
++`pkg query "%rn-%rv %ro" ${origin}`
++EOF
 +		fi
  	done
  
  	if [ -n "$PM_URB_LIST" ]; then
-@@ -2656,7 +2852,11 @@
+@@ -2656,7 +2854,11 @@
  
  	for req_by in $PM_URB_LIST; do
  		# Probably not needed, but JIC

 if [ -n "$preserve_dir" ]; then
 	rmdir $preserve_dir 2>/dev/null
 	unset preserve_dir preserve_port_files
@@ -3781,7 +4024,12 @@
 temp=`find $LOCALBASE_COMPAT -type d -empty 2>/dev/null`
 if [ -z "$temp" ] && [ -d "$LOCALBASE_COMPAT" ]; then
 	unset files

 		done
 
 		build_only_dl_g=" `uniquify_list $temp_bodlg` "
@@ -2626,7 +2814,7 @@
 
 urb_update () {
 	# Global: PM_URB_UP
-	local verb origin req_by
+	local verb origin req_by req_by_o
 
 	verb=checking ; [ -n "$1" ] && verb=updating
 
@@ -2636,15 +2824,25 @@
 	echo ''
 
 	for origin in $PM_URB_ORIGINS; do
