summaryrefslogtreecommitdiffstats
path: root/lib/package
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-07-05 23:01:13 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-07-05 23:01:13 (EDT)
commit088a61c64c29acb17ea9a097d644418f90635496 (patch)
tree858897a3a9929f87d860ef97c56dac43d420c7ac /lib/package
parent137700f42f49ed0ed30ebe3c3bce6092635a0ece (diff)
_ob_parse_package_metadata_2(): Validate section
On ob_get_binary_packages()'s first run, binary package control files haven't yet been parsed.
Diffstat (limited to 'lib/package')
-rw-r--r--lib/package/2.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/package/2.sh b/lib/package/2.sh
index 1ed7466..3e7bc0a 100644
--- a/lib/package/2.sh
+++ b/lib/package/2.sh
@@ -28,6 +28,7 @@ _ob_source_substvars_set_2=false
_ob_parse_package_metadata_2()
{
local pkg=
+ local sect=
ob_parse_control "${_ob_package_dir}/control" _ob_srcfield_2 '' \
"${_OB_SOURCE_FIELDS_REQUIRED_2}" \
@@ -39,6 +40,11 @@ _ob_parse_package_metadata_2()
_ob_binfield_2 "${pkg}" \
"${_OB_BINARY_FIELDS_REQUIRED_2}" \
"${_OB_BINARY_FIELDS_OPTIONAL_2}"
+ sect="$(ob_get_binary_parameter "${pkg}" 'Section')"
+ if ! ob_validate_section "${sect}"; then
+ _ob_warn_msg 'bad_section' "${pkg}" "${sect}"
+ continue
+ fi
done
return 0