From 8173bcbcc3a05333979b0da0a765b4dedde7448e Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Wed, 13 Mar 2019 03:54:58 -0400 Subject: Don't let libopkbuild errors cause exit with -e --- (limited to 'lib') diff --git a/lib/changelog.sh b/lib/changelog.sh index 3216f94..83f4ca1 100644 --- a/lib/changelog.sh +++ b/lib/changelog.sh @@ -151,10 +151,8 @@ ob_parse_changelog() elif [ -n "${source}" ]; then "${entry_cb}" "${source}" "${version}" \ "${distribution}" "${changes}" \ - "${maintainer}" "${date}" - if [ ${?} -ne 0 ]; then + "${maintainer}" "${date}" || \ return 0 - fi fi expect='next_or_eof' blank_lines='' diff --git a/lib/metadata.sh b/lib/metadata.sh index c6f5a16..e22a6e7 100644 --- a/lib/metadata.sh +++ b/lib/metadata.sh @@ -22,9 +22,9 @@ _ob_metadata_do() local func="${1}" shift 1 || _ob_abort - "_ob_${func}" "${@}" + "_ob_${func}" "${@}" || return ${?} - return ${?} + return 0 } ## @brief Validate a source package name @@ -39,9 +39,9 @@ ob_validate_source_name() local name="${1}" shift 1 || _ob_abort - _ob_metadata_do 'validate_source_name' "${name}" + _ob_metadata_do 'validate_source_name' "${name}" || return ${?} - return ${?} + return 0 } ## @brief Validate a binary package name @@ -56,9 +56,9 @@ ob_validate_binary_name() local name="${1}" shift 1 || _ob_abort - _ob_metadata_do 'validate_binary_name' "${name}" + _ob_metadata_do 'validate_binary_name' "${name}" || return ${?} - return ${?} + return 0 } ## @brief Parse a source package version @@ -136,9 +136,9 @@ ob_parse_version() ## @pure yes This function has no side effects. ob_get_system_arch() { - _ob_metadata_do 'get_system_arch' + _ob_metadata_do 'get_system_arch' || return ${?} - return ${?} + return 0 } ## @brief Get the running system's platform @@ -151,9 +151,9 @@ ob_get_system_arch() ## @pure yes This function has no side effects. ob_get_system_plat() { - _ob_metadata_do 'get_system_plat' + _ob_metadata_do 'get_system_plat' || return ${?} - return ${?} + return 0 } ob_match_arch() @@ -328,7 +328,7 @@ ob_get_system_path() local path_id="${1}" shift 1 || _ob_abort - _ob_metadata_do 'get_system_path' "${path_id}" "${@}" + _ob_metadata_do 'get_system_path' "${path_id}" "${@}" || return ${?} - return ${?} + return 0 } diff --git a/lib/metadata/proteanos.sh b/lib/metadata/proteanos.sh index 4152847..6368668 100644 --- a/lib/metadata/proteanos.sh +++ b/lib/metadata/proteanos.sh @@ -72,11 +72,14 @@ _ob_validate_version() local version="${1}" shift 1 || _ob_abort - grep -E "${_OB_VERSION_RE_PROTEANOS}" >/dev/null 2>&1 <<-EOF + if grep -E "${_OB_VERSION_RE_PROTEANOS}" >/dev/null 2>&1 <<-EOF ${version} EOF - - return ${?} + then + return 0 + else + return 1 + fi } _ob_get_upstreamver() diff --git a/lib/package.sh b/lib/package.sh index c2ffae2..aa1a9a3 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -53,9 +53,9 @@ _ob_package_do() local func="${1}" shift 1 || _ob_abort - "_ob_${func}_${_OB_PACKAGE_FORMAT}" "${@}" + "_ob_${func}_${_OB_PACKAGE_FORMAT}" "${@}" || return ${?} - return ${?} + return 0 } ob_parse_package_metadata() @@ -252,9 +252,9 @@ ob_get_binary_parameter() ob_get_doc_package() { - _ob_package_do 'get_doc_package' + _ob_package_do 'get_doc_package' || return ${?} - return ${?} + return 0 } ob_get_doc_files() @@ -263,9 +263,9 @@ ob_get_doc_files() local plat="${2}" shift 2 || _ob_abort - _ob_package_do 'get_doc_files' "${arch}" "${plat}" + _ob_package_do 'get_doc_files' "${arch}" "${plat}" || return ${?} - return ${?} + return 0 } ob_summarize_package_arch() @@ -287,9 +287,9 @@ ob_set_package_substvars() local pkg="${1}" shift 1 || _ob_abort - _ob_package_do 'set_package_substvars' "${pkg}" + _ob_package_do 'set_package_substvars' "${pkg}" || return ${?} - return ${?} + return 0 } _ob_set_binary_packages() -- cgit v0.9.1