diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-05 00:24:21 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2020-07-05 00:24:51 (EDT) |
commit | aee0be0d0605d98c411c4c042be70d66503c6215 (patch) | |
tree | 8d8eb80415197d1b074990bc0287316463795795 /lib/metadata.sh | |
parent | 9540cac3c18c89cb35774ec9c0f02df627d71b3e (diff) |
ob_validate_section(): New function
Diffstat (limited to 'lib/metadata.sh')
-rw-r--r-- | lib/metadata.sh | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/metadata.sh b/lib/metadata.sh index 44fc427..dac8105 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -335,6 +335,23 @@ ob_get_system_path() return 0 } +## @brief Validate a section name +## @details \fBob_validate_section\fP() validates a package archive section name +## against the list in the metadata plugin selected at libopkbuild's +## build time. +## @operand section req The section name to validate. +## @return Returns 0 if valid or 1 if invalid. +## @pure yes This function has no side effects. +ob_validate_section() +{ + local section="${1}" + shift 1 || _ob_abort + + _ob_metadata_do 'validate_section' "${section}" || return ${?} + + return 0 +} + ## @brief Get a possibly architecture-qualified package name ## @details \fBob_qualify_package_name\fP() qualifies the name of a binary ## package with the host architecture if the package is in a section |