Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
Fix a bug building PBIs from pkgng, when doing before/after ports,
Browse files Browse the repository at this point in the history
use pkg rquery to see if it exists instead of checking /usr/ports
  • Loading branch information
Kris Moore committed Nov 27, 2013
1 parent e66bf9e commit 7121e12
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src-sh/pbi-manager10/pbi-manager
Expand Up @@ -5233,6 +5233,15 @@ start_pbi_mkportbefore()


for port in ${PBI_MKPORTBEFORE} for port in ${PBI_MKPORTBEFORE}
do do
if [ -n "$PBI_PKGNGBUILD" ] ; then
pkg-static rquery '%v' ${port} >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
exit_err "No package exists for: ${port}"
fi
do_port_build "${port}"
continue
fi

if [ ! -d "/usr/ports/${port}" ] ; then if [ ! -d "/usr/ports/${port}" ] ; then
exit_err "/usr/ports/${port} does not exist!" exit_err "/usr/ports/${port} does not exist!"
fi fi
Expand All @@ -5248,6 +5257,16 @@ start_pbi_mkportafter()


for port in ${PBI_MKPORTAFTER} for port in ${PBI_MKPORTAFTER}
do do
if [ -n "$PBI_PKGNGBUILD" ] ; then
pkg-static rquery '%v' ${port} >/dev/null 2>/dev/null
if [ $? -ne 0 ] ; then
exit_err "No package exists for: ${port}"
fi
do_port_build "${port}"
continue
fi

# Doing a regular port build
if [ ! -d "/usr/ports/${port}" ] ; then if [ ! -d "/usr/ports/${port}" ] ; then
exit_err "/usr/ports/${port} does not exist!" exit_err "/usr/ports/${port} does not exist!"
fi fi
Expand Down

0 comments on commit 7121e12

Please sign in to comment.