From 088a61c64c29acb17ea9a097d644418f90635496 Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sun, 05 Jul 2020 23:01:13 -0400 Subject: _ob_parse_package_metadata_2(): Validate section On ob_get_binary_packages()'s first run, binary package control files haven't yet been parsed. --- (limited to 'lib/package') 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 -- cgit v0.9.1