Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Oct 2018 15:17:20 -0600
From:      Cy Schubert <Cy.Schubert@cschubert.com>
To:        Stefan Esser <se@FreeBSD.org>,  "ports-committers@freebsd.org" <ports-committers@freebsd.org>,  "svn-ports-all@freebsd.org" <svn-ports-all@freebsd.org>,  "svn-ports-head@freebsd.org" <svn-ports-head@freebsd.org>
Subject:   RE: svn commit: r482006 - in head/ports-mgmt/portmaster: . files
Message-ID:  <20181013211715.7EBD38E4@spqr.komquats.com>

next in thread | raw e-mail | index | archive | help
The underlying problem should be fixed instead of a workaround.

---
Sent using a tiny phone keyboard.
Apologies for any typos and autocorrect.
Also, this old phone only supports top post. Apologies.

Cy Schubert
<Cy.Schubert@cschubert.com> or <cy@freebsd.org>
The need of the many outweighs the greed of the few.
---

-----Original Message-----
From: Stefan Esser
Sent: 13/10/2018 13:22
To: ports-committers@freebsd.org; svn-ports-all@freebsd.org; svn-ports-head=
@freebsd.org
Subject: svn commit: r482006 - in head/ports-mgmt/portmaster: . files

Author: se
Date: Sat Oct 13 19:22:47 2018
New Revision: 482006
URL: https://svnweb.freebsd.org/changeset/ports/482006

Log:
  Make portmaster use "pkg-static" instead of "pkg". This prevents problems
  with inconsistent shared library references that may occur when openssl i=
n
  base is upgraded to version 1.1.1 with 1.0.x installed from a port.
 =20
  Approved by:	antoine (implicit)

Modified:
  head/ports-mgmt/portmaster/Makefile
  head/ports-mgmt/portmaster/files/patch-portmaster

Modified: head/ports-mgmt/portmaster/Makefile
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- head/ports-mgmt/portmaster/Makefile	Sat Oct 13 19:09:14 2018	(r482005)
+++ head/ports-mgmt/portmaster/Makefile	Sat Oct 13 19:22:47 2018	(r482006)
@@ -2,7 +2,7 @@
=20
 PORTNAME=3D	portmaster
 PORTVERSION=3D	3.19
-PORTREVISION=3D	15
+PORTREVISION=3D	16
 CATEGORIES=3D	ports-mgmt
=20
 MAINTAINER=3D	se@FreeBSD.org

Modified: head/ports-mgmt/portmaster/files/patch-portmaster
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- head/ports-mgmt/portmaster/files/patch-portmaster	Sat Oct 13 19:09:14 2=
018	(r482005)
+++ head/ports-mgmt/portmaster/files/patch-portmaster	Sat Oct 13 19:22:47 2=
018	(r482006)
@@ -1,6 +1,6 @@
 --- portmaster.orig	2018-01-14 21:53:23 UTC
 +++ portmaster
-@@ -7,9 +7,9 @@ trap trap_exit INT
+@@ -7,10 +7,12 @@ trap trap_exit INT
 =20
  umask 022
 =20
@@ -11,9 +11,12 @@
 +progname=3D"${0##*/}"			# program name in messages
 +program=3D"$(realpath $0 || echo $0)"	# full path to program for recursiv=
e calls
 =20
++PKG_CMD=3D"/usr/local/sbin/pkg-static"
++
  # Initialize crucial values for the parent, and export them for the child=
ren
  if [ -z "$PM_PARENT_PID" ]; then
-@@ -45,7 +45,7 @@ if [ -z "$PM_PARENT_PID" ]; then
+ 	PM_PARENT_PID=3D$$
+@@ -45,7 +47,7 @@ if [ -z "$PM_PARENT_PID" ]; then
  	my_environment=3D`set`
 =20
  	# If we are already root, unset this to avoid potential conflict
@@ -22,7 +25,7 @@
  fi
 =20
  #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Begin functions we always =
want to have =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
-@@ -181,7 +181,7 @@ parent_exit () {
+@@ -181,7 +183,7 @@ parent_exit () {
 =20
  		pm_v "=3D=3D=3D>>> Removing empty directories from WRKDIRPREFIX"
  		[ -n "$needws" ] && echo '' || pm_v
@@ -31,7 +34,16 @@
  	fi
 =20
  	case "$DISPLAY_LIST" in
-@@ -260,7 +260,7 @@ safe_exit () {
+@@ -195,7 +197,7 @@ parent_exit () {
+=20
+ 		: ${PAGER:=3D'less -e'}
+ 		(
+-		pkg query "=3D=3D=3D>>> pkg-message for %n-%v\n%M" $DISPLAY_LIST
++		$PKG_CMD query "=3D=3D=3D>>> pkg-message for %n-%v\n%M" $DISPLAY_LIST
+ 		echo "=3D=3D=3D>>> Done displaying pkg-message files" ; echo '' ) | $PA=
GER ;;
+ 	esac
+=20
+@@ -260,7 +262,7 @@ safe_exit () {
  		parent_exit $1
  	else
  		# Save state for the parent process to read back in
@@ -40,7 +52,7 @@
  		if [ -z "$PM_FIRST_PASS" ]; then
  			echo "DISPLAY_LIST=3D'$DISPLAY_LIST'" >> $IPC_SAVE
  			echo "INSTALLED_LIST=3D'$INSTALLED_LIST'" >> $IPC_SAVE
-@@ -308,50 +308,49 @@ safe_exit () {
+@@ -308,50 +310,49 @@ safe_exit () {
  	exit ${1:-0}
  } # safe_exit()
 =20
@@ -77,8 +89,9 @@
  		fail "mktemp for $1 failed:\n       ${pm_mktemp_file#mktemp: }"
  }
  pm_unlink () { [ -e "$1" ] && /bin/unlink $1; }
- pm_islocked	() { local locked; [ -n "$1" ] && locked=3D`pkg query %k "$1"=
` &&
+-pm_islocked	() { local locked; [ -n "$1" ] && locked=3D`pkg query %k "$1"=
` &&
 -			[ "$locked" =3D 1 -o -e "$pdb/$1/+IGNOREME" ]; }
++pm_islocked	() { local locked; [ -n "$1" ] && locked=3D`$PKG_CMD query %k=
 "$1"` &&
 +			[ "$locked" =3D 1 ] || [ -e "$pdb/$1/+IGNOREME" ]; }
 =20
  # Superuser versions for commands that need root privileges
@@ -92,7 +105,7 @@
  pm_mkdir_s        () { $PM_SU_CMD /bin/mkdir -p $1; }
  pm_pkg_delete_s   () {
 -	$PM_SU_CMD /usr/local/sbin/pkg delete -yf $*;
-+	$PM_SU_CMD /usr/local/sbin/pkg delete -yf "$@";
++	$PM_SU_CMD /usr/local/sbin/pkg-static delete -yf "$@";
  	for d in $* ; do
  	    pm_rm_s -rf $pdb/$d
  	done
@@ -108,7 +121,16 @@
  pm_sv             () { [ -n "$PM_SU_VERBOSE" ] && echo -e "=3D=3D=3D>>> S=
U $*"; }
 =20
  # Do this here so we can have a reasonably good guess.
-@@ -562,12 +561,37 @@ find_glob_dirs () {
+@@ -549,7 +550,7 @@ find_glob_dirs () {
+=20
+ 	pattern=3D`globstrip $1`
+=20
+-	glob_dirs=3D`pkg query -g "%n-%v" ${pattern}\*`
++	glob_dirs=3D`$PKG_CMD query -g "%n-%v" ${pattern}\*`
+ 	case "$glob_dirs" in
+ 	# Match a newline in multiple responses from find
+ 	*'
+@@ -562,12 +563,37 @@ find_glob_dirs () {
  	return 1
  }
 =20
@@ -138,17 +160,27 @@
 +	local flavor pkgname origin_flavor
 =20
  	pkgname=3D"$1"
- 	flavor=3D$(pkg annotate -Sq "$pkgname" flavor)
+-	flavor=3D$(pkg annotate -Sq "$pkgname" flavor)
 -	pkg query '%o'"${flavor:+@$flavor}" "$pkgname" 2>/dev/null && return
++	flavor=3D$($PKG_CMD annotate -Sq "$pkgname" flavor)
 +=09
-+	if origin_flavor=3D$(pkg query '%o'"${flavor:+@$flavor}" "$pkgname" 2>/d=
ev/null); then
++	if origin_flavor=3D$($PKG_CMD query '%o'"${flavor:+@$flavor}" "$pkgname"=
 2>/dev/null); then
 +		match_flavor $origin_flavor $pkgname
 +		return 0
 +	fi
 =20
  	case "$pkgname" in bsdpan-*) return 3 ;; esac
 =20
-@@ -789,6 +813,7 @@ if [ -n "$ALWAYS_SCRUB_DISTFILES" -a -n "$DONT_SCRUB_D
+@@ -728,7 +754,7 @@ while getopts 'BCDFGHKLPRabde:fghilm:nop:r:stvwx:y' CO
+ 	o)	REPLACE_ORIGIN=3Doopt ;; # -o should take a parameter and $OPTARG sho=
uld be assigned here
+ 	p)	fail 'The -p option has been deprecated' ;;
+ 	r)	PM_URB=3Dropt
+-		if [ -d "$pdb/$OPTARG" ] && pkg info -e $OPTARG; then
++		if [ -d "$pdb/$OPTARG" ] && $PKG_CMD info -e $OPTARG; then
+ 			glob_dirs=3D$OPTARG
+ 		else
+ 			case "$OPTARG" in */*) fail 'The argument to -r must be a package name=
, or a glob pattern' ;; esac
+@@ -789,6 +815,7 @@ if [ -n "$ALWAYS_SCRUB_DISTFILES" -a -n "$DONT_SCRUB_D
  		fail "The -d and -D options are mutually exclusive"
  fi
 =20
@@ -156,7 +188,16 @@
  [ -n "$PM_NO_MAKE_CONFIG" -a -n "$PM_FORCE_CONFIG" ] && unset PM_NO_MAKE_=
CONFIG
 =20
  if [ -n "$LIST" -o -n "$LIST_PLUS" ]; then
-@@ -927,6 +952,9 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
+@@ -875,7 +902,7 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
+ 		fi
+ 		unset INDEXFILE INDEXDIR
+=20
+-		PM_INDEX_PORTS=3D`pkg version -Ivl\< $PM_INDEX | cut -f1 -d\<`
++		PM_INDEX_PORTS=3D`$PKG_CMD version -Ivl\< $PM_INDEX | cut -f1 -d\<`
+ 		export PM_INDEX_PORTS
+=20
+ 		if [ -z "$pd" -o "$pd" !=3D /usr/ports ]; then
+@@ -927,6 +954,9 @@ if [ "$$" -eq "$PM_PARENT_PID" ]; then
  	fi
  fi	# [ "$$" -eq "$PM_PARENT_PID" ]
 =20
@@ -166,7 +207,21 @@
  #=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Begin functions relevant t=
o --features and main =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 =20
  # find installed port for given origin (with optional @flavor) in the pkg=
 DB
-@@ -1002,25 +1030,6 @@ get_answer_yn () {
+@@ -938,11 +968,11 @@ iport_from_origin () {
+=20
+ 	origin=3D$(dir_part "$1")
+ 	flavor=3D$(flavor_part "$1")
+-	pkgname_l=3D$(echo $(pkg query '%n-%v' $origin)) || return 1
++	pkgname_l=3D$(echo $($PKG_CMD query '%n-%v' $origin)) || return 1
+ 	# if multiple flavors registered then fall back to $FLAVOR if no flavor =
has been passed in $1
+ 	[ "${pkgname_l}" !=3D "${pkgname_l#* }" ] && : ${flavor:=3D$FLAVOR}
+ 	for pkgname in $pkgname_l; do
+-		pkgflavor=3D$(pkg annotate -Sq "$pkgname" flavor)
++		pkgflavor=3D$($PKG_CMD annotate -Sq "$pkgname" flavor)
+ 		if [ "$pkgflavor" =3D "$flavor" ]; then
+ 			echo $pkgname
+ 			return 0
+@@ -1002,25 +1032,6 @@ get_answer_yn () {
  	fi
  }
 =20
@@ -192,7 +247,7 @@
  # Find the new origin for moved ports
  # Set global variable moved_npd on success
  # Return values:
-@@ -1056,7 +1065,8 @@ find_moved_port () {
+@@ -1056,7 +1067,8 @@ find_moved_port () {
  			fi ;;
  		${sf}\|*) moved_npd=3D${moved#*\|}	# New port directory
  			moved_npd=3D${moved_npd%%\|*}
@@ -202,7 +257,16 @@
  			echo ''
  			echo "	=3D=3D=3D>>> The $sf port moved to $moved_npd"
  			echo "	=3D=3D=3D>>> Reason: ${moved##*|}"
-@@ -1146,11 +1156,10 @@ read_distinfos_all () {
+@@ -1082,7 +1094,7 @@ find_moved_port () {
+ }
+=20
+ all_pkgs_by_origin () {
+-	namesorigins=3D`pkg query -a "%n-%v %o"`
++	namesorigins=3D`$PKG_CMD query -a "%n-%v %o"`
+ 	echo "$namesorigins"
+ 	return
+ }
+@@ -1146,11 +1158,10 @@ read_distinfos_all () {
  	echo ''
 =20
  	for origin in ${pd}/*/*; do
@@ -215,7 +279,66 @@
 =20
  		if [ -s "${origin}/distinfo" ]; then
  			distinfo=3D"${origin}/distinfo"
-@@ -1377,14 +1386,14 @@ if [ -n "$CHECK_PORT_DBDIR" ]; then
+@@ -1181,17 +1192,17 @@ ports_by_category () {
+ 	local pkg
+=20
+ 	pm_v "=3D=3D=3D>>> Sorting ports by category"
+-	roots=3D`   pkg query -e "%#d =3D 0 && %#r =3D 0" "%n-%v"`
+-	trunks=3D`  pkg query -e "%#d =3D 0 && %#r > 0" "%n-%v"`
+-	branches=3D`pkg query -e "%#d > 0 && %#r > 0" "%n-%v"`
+-	leaves=3D`  pkg query -e "%#d > 0 && %#r =3D 0" "%n-%v"`
++	roots=3D`   $PKG_CMD query -e "%#d =3D 0 && %#r =3D 0" "%n-%v"`
++	trunks=3D`  $PKG_CMD query -e "%#d =3D 0 && %#r > 0" "%n-%v"`
++	branches=3D`$PKG_CMD query -e "%#d > 0 && %#r > 0" "%n-%v"`
++	leaves=3D`  $PKG_CMD query -e "%#d > 0 && %#r =3D 0" "%n-%v"`
+=20
+ 	num_roots=3D$(echo    $(echo $roots    | wc -w))
+ 	num_trunks=3D$(echo   $(echo $trunks   | wc -w))
+ 	num_branches=3D$(echo $(echo $branches | wc -w))
+ 	num_leaves=3D$(echo   $(echo $leaves   | wc -w))
+=20
+-	num_ports=3D$(echo $(pkg query -a "%n-%v" | wc -w))
++	num_ports=3D$(echo $($PKG_CMD query -a "%n-%v" | wc -w))
+ }
+=20
+ delete_empty_dist_subdirs () {
+@@ -1279,7 +1290,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then
+ 	for package in `find $PACKAGES -type f | sort`; do
+ 		pkg_dir=3D${package##*/} ; pkg_dir=3D${pkg_dir%\.*} ; echo ''
+=20
+-		origin=3D`pkg query -F $package "%o" 2>/dev/null` ||
++		origin=3D`$PKG_CMD query -F $package "%o" 2>/dev/null` ||
+ 			origin=3D`tar -O -zxvf $package '+CONTENTS' 2>/dev/null | grep '@comme=
nt ORIGIN:'` ||
+ 			origin=3D`tar -O -zxvf $package '+MANIFEST' 2>/dev/null | grep '^origi=
n:'` ||
+ 			fail "Empty origin in $package"
+@@ -1302,7 +1313,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then
+ 		if [ -n "$port_ver" ]; then
+ 			if [ "$port_ver" =3D "$pkg_dir" ]; then
+ 				echo "=3D=3D=3D>>> ${package##*/} is up to date"
+-				if ! pkg info -e $pkg_dir; then
++				if ! $PKG_CMD info -e $pkg_dir; then
+ 					echo "	=3D=3D=3D>>> $pkg_dir is not installed"
+ 					echo "	=3D=3D=3D>>> Path: ${package}"
+ 					get_answer_yn y "\n\t=3D=3D=3D>>> Delete stale package: ${package##*=
/}"
+@@ -1320,7 +1331,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then
+=20
+ 			unset port_ver
+=20
+-			if pkg info -e $pkg_dir; then
++			if $PKG_CMD info -e $pkg_dir; then
+ 				echo "	=3D=3D=3D>>> ${package##*/} matches the installed version"
+ 			else
+ 				echo "	=3D=3D=3D>>> ${package##*/} is not installed"
+@@ -1362,7 +1373,7 @@ if [ -n "$CLEAN_PACKAGES" ]; then
+ fi	# [ -n "$CLEAN_PACKAGES" ]
+=20
+ if [ -n "$CHECK_DEPENDS" ]; then
+-	pkg check -dn
++	$PKG_CMD check -dn
+ 	exit 0
+ fi
+=20
+@@ -1377,14 +1388,14 @@ if [ -n "$CHECK_PORT_DBDIR" ]; then
  		if ! pm_isdir_pd "$origin"; then
  			find_moved_port $origin $pkg nonfatal >/dev/null
  			[ -n "$moved_npd" ] || continue
@@ -232,7 +355,16 @@
  	done <<-EOF
  	$(all_pkgs_by_origin)
  	EOF
-@@ -1502,7 +1511,7 @@ check_for_updates () {
+@@ -1413,7 +1424,7 @@ if [ -n "$CHECK_PORT_DBDIR" ]; then
+ fi
+=20
+ if [ -n "$LIST_ORIGINS" ]; then
+-	pkg query -e '%#r =3D 0' '%o'
++	$PKG_CMD query -e '%#r =3D 0' '%o'
+=20
+ 	exit 0
+ fi
+@@ -1502,7 +1513,7 @@ check_for_updates () {
  	fi
 =20
  	if [ -z "$do_update" -a -z "$skip" -a -z "$PM_INDEX_ONLY" ] && pm_isdir =
"$pd/$origin"; then
@@ -241,7 +373,70 @@
  			if pm_islocked "$iport"; then
  				echo "	=3D=3D=3D>>> Warning: Unable to cd to $pd/$origin"
  				echo "	=3D=3D=3D>>> Continuing due to $pdb/$iport/+IGNOREME"
-@@ -2175,23 +2184,29 @@ update_pm_nu () {
+@@ -1545,7 +1556,7 @@ check_for_updates () {
+ 				unset port_ver
+ 			fi
+ 		else
+-			case `pkg version -t $iport $port_ver` in
++			case `$PKG_CMD version -t $iport $port_ver` in
+ 			\<)	do_update=3Dupd_lt ;;
+ 			=3D)	;;	# Can be reached if same version with different options
+ 			\>)	if [ -n "$PM_VERBOSE" ]; then
+@@ -1628,7 +1639,7 @@ pm_pkg_create () {
+ 	fi
+=20
+ 	pm_cd $pkgdir || fail "Cannot cd into $pkgdir to create a package"
+-	if $PM_SU_CMD pkg create $format_option $2; then
++	if $PM_SU_CMD $PKG_CMD create $format_option $2; then
+ 		if [ "$1" =3D "$pbu" ]; then
+ 			if [ -n "$BACKUP" ]; then
+ 				echo "	=3D=3D=3D>>> Package saved to $1" ; echo ''
+@@ -1980,7 +1991,7 @@ if [ -n "$LIST" -o -n "$LIST_PLUS" ]; then
+ fi
+=20
+ if [ -n "$EXPUNGE" ]; then
+-	if ! pm_isdir "$pdb/$EXPUNGE" || ! pkg info -e $EXPUNGE; then
++	if ! pm_isdir "$pdb/$EXPUNGE" || ! $PKG_CMD info -e $EXPUNGE; then
+ 		find_glob_dirs $EXPUNGE
+ 		case $? in
+ 		1)	fail "No such port: $EXPUNGE" ;;
+@@ -1992,7 +2003,7 @@ if [ -n "$EXPUNGE" ]; then
+ 	fi
+=20
+ 	origin=3D`origin_from_pdb $EXPUNGE`
+-	deplist=3D`pkg query "%rn-%rv" $origin`
++	deplist=3D`$PKG_CMD query "%rn-%rv" $origin`
+ 	if [ -n "$deplist" ]; then
+ 		echo "=3D=3D=3D>>> Warning: Ports with dependencies on ${EXPUNGE}:"
+ 		echo "$deplist" | sed 's/^/	/'
+@@ -2020,7 +2031,7 @@ fi
+ if [ -n "$CLEAN_STALE" ]; then
+ 	[ -z "$no_del_list" ] && export no_del_list=3D':'
+=20
+-	stale_ports=3D`pkg query -ae '%a =3D 1' '%?r %n-%v' | awk '/^0 / { print=
 \$2 }'`
++	stale_ports=3D`$PKG_CMD query -ae '%a =3D 1' '%?r %n-%v' | awk '/^0 / { =
print \$2 }'`
+ 	for file in $stale_ports; do
+ 		iport=3D"${file%/+REQUIRED_BY}" ; iport=3D${iport#$pdb/}
+=20
+@@ -2040,7 +2051,7 @@ if [ -n "$CLEAN_STALE" ]; then
+ 			continue
+ 		fi
+=20
+-		echo '' ; pkg info -f $iport
++		echo '' ; $PKG_CMD info -f $iport
+=20
+ 		get_answer_yn n "\t=3D=3D=3D>>> ${iport} is no longer depended on, dele=
te"
+ 		case "$?" in
+@@ -2073,7 +2084,7 @@ check_restart_and_udf () {
+ 	# to go out to the disk if we don't have to.
+ 	[ -z "$RESTART" ] && return 1
+=20
+-	if [ ! -e "$pdb/${1}/PM_UPGRADE_DONE_FLAG" ] || ! pkg info -e $1; then
++	if [ ! -e "$pdb/${1}/PM_UPGRADE_DONE_FLAG" ] || ! $PKG_CMD info -e $1; t=
hen
+ 		return 1
+ 	else
+ 		already_done $1
+@@ -2175,26 +2186,32 @@ update_pm_nu () {
  }
 =20
  update_build_l () {
@@ -274,8 +469,12 @@
 +
  	find_new_port "$originflavor" # sets global variable new_port
 =20
- 	case `pkg version -t $iport $new_port 2>/dev/null` in
-@@ -2203,8 +2218,9 @@ update_build_l () {
+-	case `pkg version -t $iport $new_port 2>/dev/null` in
++	case `$PKG_CMD version -t $iport $new_port 2>/dev/null` in
+ 	\<)	build_l=3D"${build_l}\tUpgrade $iport to $new_port\n" ;;
+ 	=3D)	build_l=3D"${build_l}\tRe-install $iport\n" ;;
+ 	\>)	build_l=3D"${build_l}\tDowngrade $iport to $new_port\n" ;;
+@@ -2203,8 +2220,9 @@ update_build_l () {
  }
 =20
  update_port () {
@@ -286,7 +485,7 @@
  	if [ -n "$2" ]; then
  		echo "=3D=3D=3D>>> Launching child to update $1 to $2"
  	else
-@@ -2300,7 +2316,7 @@ make_dep_list () {
+@@ -2300,7 +2318,7 @@ make_dep_list () {
  			fail "make_dep_list: Unsupported option '$dep_type'"
  		esac
  	done
@@ -295,7 +494,7 @@
  }
 =20
  gen_dep_list () {
-@@ -2368,15 +2384,17 @@ dependency_check () {
+@@ -2368,15 +2386,17 @@ dependency_check () {
  		rundeps=3D`gen_dep_list run-depends-list`
 =20
  		for dep in $d_port_list; do
@@ -306,7 +505,7 @@
  			# installed by package and/or removed
 -			pkg info -e ${dep#$pd/} &&
 -				run_dl=3D"$run_dl $dep" &&
-+			pkg info -e ${depdir#$pd/} &&
++			$PKG_CMD info -e ${depdir#$pd/} &&
 +				run_dl=3D"$run_dl $depdir" &&
  				continue
  			case "$rundeps" in
@@ -316,7 +515,7 @@
  				rundep_list=3D"$rundep_list $varname"
  				eval $varname=3D\"$portdir \$$varname\"
  				eval ${varname}_p=3D$dep
-@@ -2409,7 +2427,10 @@ dependency_check () {
+@@ -2409,7 +2429,10 @@ dependency_check () {
 =20
  	# Do not export, for THIS parent process only
  	[ -n "$PM_FIRST_PASS" ] && doing_dep_check=3Ddoing_dep_check
@@ -328,7 +527,7 @@
  		origin=3D"${d_port#$pd/}"
  		if [ -n "$SHOW_WORK" ]; then
  			iport=3D`iport_from_origin $origin`
-@@ -2429,20 +2450,14 @@ dependency_check () {
+@@ -2429,23 +2452,17 @@ dependency_check () {
  		[ -z "$PM_URB_UP" ] &&
  			case "$CUR_DEPS" in *:${origin}:*) continue ;; esac
 =20
@@ -352,8 +551,12 @@
 +				conflicts=3D`FLAVOR=3D$flavor pm_make_b -V CONFLICTS -V CONFLICTS_BUI=
LD -V CONFLICTS_INSTALL`	=20
  			fi
  			for glob in $conflicts; do
- 				confl_p=3D`pkg query -g "%n-%v" $glob 2>/dev/null`
-@@ -2498,7 +2513,11 @@ dependency_check () {
+-				confl_p=3D`pkg query -g "%n-%v" $glob 2>/dev/null`
++				confl_p=3D`$PKG_CMD query -g "%n-%v" $glob 2>/dev/null`
+ 				if [ -n "$confl_p" ]; then
+ 					confl_p=3D${confl_p%% *}
+ 					d_port=3D"$pd/`origin_from_pdb $confl_p`"
+@@ -2498,7 +2515,11 @@ dependency_check () {
  			check_for_updates $iport $origin || fail 'Update failed'
  		else
  			check_interactive $origin || continue
@@ -366,8 +569,44 @@
  		fi
  	done
  	[ -n "$PM_FIRST_PASS" ] && unset doing_dep_check
-@@ -2773,8 +2792,8 @@ multiport () {
+@@ -2587,7 +2608,7 @@ post_first_pass () {
+ 		done
 =20
+ 		for dep in $build_only_dl_g; do
+-			[ "`pkg query "%?r" ${dep#$pd/}`" =3D "1" ] && continue
++			[ "`$PKG_CMD query "%?r" ${dep#$pd/}`" =3D "1" ] && continue
+ 			[ -n "$PM_DEL_BUILD_ONLY" ] &&
+ 				iport_from_origin ${dep#$pd/} >/dev/null && continue
+ 			temp_bodlg=3D"$temp_bodlg $dep"
+@@ -2629,7 +2650,7 @@ urb_update () {
+ 			case " $PM_URB_ORIGINS" in *" $req_by_o "*) continue ;; esac
+ 			PM_URB_LIST=3D"${PM_URB_LIST} ${req_by}"
+ 		done <<-EOF
+-		$(pkg query "%rn-%rv %ro" ${origin})
++		$($PKG_CMD query "%rn-%rv %ro" ${origin})
+ 		EOF
+ 	done
+=20
+@@ -2642,7 +2663,7 @@ urb_update () {
+=20
+ 	for req_by in $PM_URB_LIST; do
+ 		# Probably not needed, but JIC
+-		pkg info -e $req_by || continue
++		$PKG_CMD info -e $req_by || continue
+=20
+ 		pm_v "=3D=3D=3D>>> $req_by depends on $PM_URB_IPORTS"
+=20
+@@ -2683,7 +2704,7 @@ multiport () {
+ 			else
+ 				fail "$pd/${port} does not exist"
+ 			fi ;;
+-		*)	if pm_isdir "$pdb/$port" && pkg info -e $port; then
++		*)	if pm_isdir "$pdb/$port" && $PKG_CMD info -e $port; then
+ 				worklist_temp=3D"$worklist_temp $port"
+ 			else
+ 				find_glob_dirs $port
+@@ -2773,8 +2794,8 @@ multiport () {
+=20
  		num=3D$(( $num + 1 ))
  		init_term_printf "$port ${num}/${numports}"
 -		("$program" $ARGS $port) || update_failed=3Dupdate_failed
@@ -377,7 +616,16 @@
  		[ -n "$update_failed" ] && fail "Update for $port failed"
 =20
  		case "$PM_NEEDS_UPDATE" in
-@@ -2823,7 +2842,7 @@ multiport () {
+@@ -2803,7 +2824,7 @@ multiport () {
+ 		*/*)	origin=3D$port ;;
+ 		*)	# If an installed version does not exist at this
+ 			# point it probably got updated as a dependency
+-			if ! pkg info -e $port; then
++			if ! $PKG_CMD info -e $port; then
+ 				numports=3D$(( $numports - 1 ))
+ 				continue
+ 			fi
+@@ -2823,7 +2844,7 @@ multiport () {
  		num=3D$(( $num + 1 ))
  		init_term_printf "$port ${num}/${numports}"
  		("$program" $ARGS $port) || update_failed=3Dupdate_failed
@@ -386,7 +634,7 @@
  		[ -n "$update_failed" ] && fail "Update for $port failed"
  	done
 =20
-@@ -3029,8 +3048,12 @@ no_valid_port () {
+@@ -3029,8 +3050,12 @@ no_valid_port () {
  	echo "=3D=3D=3D>>> Try $progname --help" ; echo '' ; safe_exit 1
  }
 =20
@@ -399,7 +647,16 @@
  	export_flavor $(flavor_part $portdir)
  	[ -n "$portdir" ] && { argv=3D$portdir ; unset portdir; }
  	argv=3D${argv:-$1} ; argv=3D${argv%/} ; argv=3D`globstrip $argv`
-@@ -3061,9 +3084,11 @@ if [ -z "$REPLACE_ORIGIN" ]; then
+@@ -3048,7 +3073,7 @@ if [ -z "$REPLACE_ORIGIN" ]; then
+ 			*)	echo '' ; no_valid_port ;;
+ 			esac
+ 		done ;;
+-	*)	upg_port=3D$(pkg query %n-%v "$argv") ;;
++	*)	upg_port=3D$($PKG_CMD query %n-%v "$argv") ;;
+ 	esac
+=20
+ 	if [ -z "$portdir" -a -z "$upg_port" ]; then
+@@ -3061,9 +3086,11 @@ if [ -z "$REPLACE_ORIGIN" ]; then
  		unset glob_dirs
  	fi
  	unset argv
@@ -412,7 +669,7 @@
  	if [ -z "$PM_INDEX_ONLY" ]; then
  		pm_isdir_pd "$portdir" ] || missing=3Dmissing
  	else
-@@ -3076,7 +3101,7 @@ else
+@@ -3076,12 +3103,12 @@ else
  		echo '' ; no_valid_port
  	fi
 =20
@@ -421,19 +678,34 @@
  	arg2=3D${2#$pd/} ; arg2=3D${arg2#$pdb/} ; arg2=3D${arg2%/}
 =20
  	case "$arg2" in
-@@ -3142,8 +3167,9 @@ iport_from_pkgname () {
+ 	*/*)	ro_opd=3D$arg2 ; ro_upg_port=3D`iport_from_origin $ro_opd` ;;
+-	*)	if pm_isdir "$pdb/$arg2" && pkg info -e $arg2; then
++	*)	if pm_isdir "$pdb/$arg2" && $PKG_CMD info -e $arg2; then
+ 			ro_upg_port=3D$arg2
+ 		else
+ 			find_glob_dirs $arg2 && ro_upg_port=3D${glob_dirs#$pdb/}
+@@ -3097,7 +3124,7 @@ else
+ 	unset arg2
 =20
+ 	if [ -z "$ro_upg_p


[The entire original message is not included.]=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20181013211715.7EBD38E4>