From a53880a6e630d05c72a2a9b32f748d92cd13d973 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 05 Jul 2020 23:03:44 -0400 Subject: _ob_set_binary_packages(): Remove _ob_get_binary_packages_2() now just prints packages. Also fix multiple issues with (re)population of ${_ob_binary_packages} in ob_get_binary_packages(). --- (limited to 'lib') diff --git a/lib/package.sh b/lib/package.sh index 8ed6645..da6d688 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -114,11 +114,10 @@ ob_get_binary_packages() if ! ${_ob_got_binary_packages}; then - _ob_package_do 'get_binary_packages' - pkgs_clean=' ' + _ob_binary_packages='' - for pkg in ${_ob_binary_packages}; do + for pkg in $(_ob_package_do 'get_binary_packages'); do # Validate the name. if ! ob_validate_binary_name "${pkg}"; then @@ -136,7 +135,7 @@ ob_get_binary_packages() esac pkgs_clean="${pkgs_clean}${pkg_clean} " - _ob_binary_packages="${_ob_binary_packages} ${pkgs}" + _ob_binary_packages="${_ob_binary_packages} ${pkg}" done @@ -281,16 +280,6 @@ ob_set_package_substvars() return 0 } -_ob_set_binary_packages() -{ - local packages="${1}" - shift 1 || _ob_abort - - _ob_binary_packages="${packages}" - - return 0 -} - _ob_set_source_parameter() { local name="${1}" diff --git a/lib/package/2.sh b/lib/package/2.sh index 3e7bc0a..471425b 100644 --- a/lib/package/2.sh +++ b/lib/package/2.sh @@ -52,7 +52,6 @@ _ob_parse_package_metadata_2() _ob_get_binary_packages_2() { - local pkgs= local pkg_control= for pkg_control in "${_ob_package_dir}/"*'.pkg/control'; do @@ -64,14 +63,10 @@ _ob_get_binary_packages_2() pkg_control="${pkg_control%.pkg/control}" pkg_control="${pkg_control##*/}" - ob_validate_binary_name "${pkg_control}" - - pkgs="${pkgs} ${pkg_control}" + printf '%s ' "${pkg_control}" done - _ob_set_binary_packages "${pkgs}" - return 0 } -- cgit v0.9.1