summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/package.sh8
-rw-r--r--locale/en_US/libopkbuild_2.sh1
2 files changed, 8 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' | \
diff --git a/locale/en_US/libopkbuild_2.sh b/locale/en_US/libopkbuild_2.sh
index 275177e..b85eb1d 100644
--- a/locale/en_US/libopkbuild_2.sh
+++ b/locale/en_US/libopkbuild_2.sh
@@ -25,6 +25,7 @@ msg_libopkbuild_2_output_info_format='%s: %s'
# lib/package.sh
msg_libopkbuild_2_unable_to_detect_package_format='Unable to detect package format'
msg_libopkbuild_2_bad_binary_name='Bad binary package name: "%s"'
+msg_libopkbuild_2_bad_section='Binary package "%s" has invalid section name "%s"'
msg_libopkbuild_2_duplicate_clean_binary_name='Duplicate clean binary package name: "%s"'
# lib/control.sh