diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-14 13:05:56 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-14 13:05:56 (EDT) |
commit | ed8d752a92661e7ff7b23109d1534d097225702a (patch) | |
tree | 72866c45124272e64c0171a9f82f110fe0365acd | |
parent | beb5940593047d706071875437becc332aeca1d0 (diff) |
ob_get_binary_packages(): Avoid multiple runs with 0 bin pkgs
-rw-r--r-- | lib/package.sh | 7 |
1 files changed, 4 insertions, 3 deletions
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='' |