From ed8d752a92661e7ff7b23109d1534d097225702a Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 14 Mar 2019 13:05:56 -0400 Subject: ob_get_binary_packages(): Avoid multiple runs with 0 bin pkgs --- diff --git a/lib/package.sh b/lib/package.sh index 0b354e0..8a02725 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -20,6 +20,7 @@ _OB_PACKAGE_DIR= _OB_PACKAGE_FORMAT= _OB_BINARY_PACKAGES= +_ob_got_binary_packages=false _OB_SOURCE_PARAMETERS= _OB_BINARY_PARAMETERS= @@ -109,9 +110,7 @@ ob_get_binary_packages() done shift $(($OPTIND - 1)) - # NB: If a source package lists no binary packages, this will be true each - # call. - if [ -z "${_OB_BINARY_PACKAGES}" ]; then + if ! ${_ob_got_binary_packages}; then _ob_package_do 'get_binary_packages' @@ -141,6 +140,8 @@ ob_get_binary_packages() done + _ob_got_binary_packages=true + fi pkgs='' -- cgit v0.9.1