diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-05 00:41:14 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-05 00:41:14 (EDT) |
commit | 137700f42f49ed0ed30ebe3c3bce6092635a0ece (patch) | |
tree | e7ae775f45db126dd18d698b3bb0a2c324909b52 /lib | |
parent | aee0be0d0605d98c411c4c042be70d66503c6215 (diff) |
ob_get_binary_packages(): Validate section
Diffstat (limited to 'lib')
-rw-r--r-- | lib/package.sh | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/package.sh b/lib/package.sh index 8ed6645..772fdc0 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -93,6 +93,7 @@ ob_get_binary_packages() local host_plat= local pkg= local pkgs_clean= + local sect= local pkg_clean= local pkgs= @@ -120,11 +121,16 @@ ob_get_binary_packages() for pkg in ${_ob_binary_packages}; do - # Validate the name. + # Validate the name and section. if ! ob_validate_binary_name "${pkg}"; then _ob_warn_msg 'bad_binary_name' "${pkg}" continue fi + sect="$(ob_get_binary_parameter "${pkg}" 'Section')" + if ! ob_validate_section "${sect}"; then + _ob_warn_msg 'bad_section' "${pkg}" "${sect}" + continue + fi # Make sure the "clean" name is unique. pkg_clean="$(printf '%s' "${pkg}" | tr 'a-z' 'A-Z' | \ |