Browse files

Fix a bug building PBIs from pkgng, when doing before/after ports,

use pkg rquery to see if it exists instead of checking /usr/ports
  • Loading branch information...
1 parent e66bf9e commit 7121e12a1ca68b829d3c0d8e577e82085206cacf @kmoore134 kmoore134 committed Nov 27, 2013
Showing with 19 additions and 0 deletions.
  1. +19 −0 src-sh/pbi-manager10/pbi-manager
View
19 src-sh/pbi-manager10/pbi-manager
@@ -5233,6 +5233,15 @@ start_pbi_mkportbefore()
for port in ${PBI_MKPORTBEFORE}
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
exit_err "/usr/ports/${port} does not exist!"
fi
@@ -5248,6 +5257,16 @@ start_pbi_mkportafter()
for port in ${PBI_MKPORTAFTER}
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
exit_err "/usr/ports/${port} does not exist!"
fi

0 comments on commit 7121e12

Please sign in to comment.