summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-07-05 23:03:44 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-07-05 23:06:05 (EDT)
commita53880a6e630d05c72a2a9b32f748d92cd13d973 (patch)
treea851bfca50398362e7ba14981b439a2005c38702
parent088a61c64c29acb17ea9a097d644418f90635496 (diff)
_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().
-rw-r--r--lib/package.sh17
-rw-r--r--lib/package/2.sh7
2 files changed, 4 insertions, 20 deletions
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
}