diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-13 19:39:59 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2019-03-13 19:39:59 (EDT) |
commit | e1e5ae15188307d55f10439431b47db0ba2b0e7d (patch) | |
tree | cef9a79cbc1d148f298baf1829819bb3608eb8eb | |
parent | 7d3e71b705485c7127b820ef84102d393d4ea1e4 (diff) |
ob_parse_package_metadata(): Merge into ob_init_package()
Now that caching is gone, the ob_parse_package_metadata() interface
function is trivially short, and keeping it separate unnecessarily
complicates the API.
-rw-r--r-- | lib/package.sh | 25 | ||||
-rw-r--r-- | src/ob-applypatches.sh | 1 | ||||
-rw-r--r-- | src/ob-buildenv.sh | 1 | ||||
-rw-r--r-- | src/ob-buildopk.sh | 1 | ||||
-rw-r--r-- | src/ob-checkbuilddeps.sh | 1 | ||||
-rw-r--r-- | src/ob-genchanges.sh | 1 | ||||
-rw-r--r-- | src/ob-gencontrol.sh | 1 | ||||
-rw-r--r-- | src/ob-installdocs.sh | 1 | ||||
-rw-r--r-- | src/ob-installplatconf.sh | 1 | ||||
-rw-r--r-- | src/ob-unpacksource.sh | 1 | ||||
-rw-r--r-- | src/opkbuild.sh | 1 |
11 files changed, 10 insertions, 25 deletions
diff --git a/lib/package.sh b/lib/package.sh index 6aa7b94..c684cc5 100644 --- a/lib/package.sh +++ b/lib/package.sh @@ -23,6 +23,16 @@ _OB_BINARY_PACKAGES= _OB_SOURCE_PARAMETERS= _OB_BINARY_PARAMETERS= +_ob_package_do() +{ + local func="${1}" + shift 1 || _ob_abort + + "_ob_${func}_${_OB_PACKAGE_FORMAT}" "${@}" || return ${?} + + return 0 +} + ob_init_package() { local dir="${1}" @@ -45,21 +55,6 @@ ob_init_package() _OB_BINARY_PACKAGES= - return 0 -} - -_ob_package_do() -{ - local func="${1}" - shift 1 || _ob_abort - - "_ob_${func}_${_OB_PACKAGE_FORMAT}" "${@}" || return ${?} - - return 0 -} - -ob_parse_package_metadata() -{ _ob_package_do 'parse_package_metadata' || return ${?} return 0 diff --git a/src/ob-applypatches.sh b/src/ob-applypatches.sh index e4e8531..ea8d1bc 100644 --- a/src/ob-applypatches.sh +++ b/src/ob-applypatches.sh @@ -61,7 +61,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 apply_patches || return 1 diff --git a/src/ob-buildenv.sh b/src/ob-buildenv.sh index 2b95f0f..1a16b4d 100644 --- a/src/ob-buildenv.sh +++ b/src/ob-buildenv.sh @@ -91,7 +91,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 ob_info "$(ob_get_msg 'setup_build_env')" diff --git a/src/ob-buildopk.sh b/src/ob-buildopk.sh index 185cc20..60b1907 100644 --- a/src/ob-buildopk.sh +++ b/src/ob-buildopk.sh @@ -46,7 +46,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 printf '2.0\n' >'debian-binary' if [ -n "${OB_DO_SOURCE}" ]; then diff --git a/src/ob-checkbuilddeps.sh b/src/ob-checkbuilddeps.sh index a87831e..d7abf32 100644 --- a/src/ob-checkbuilddeps.sh +++ b/src/ob-checkbuilddeps.sh @@ -89,7 +89,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 ob_set_package_substvars '' check_build_deps || return ${?} diff --git a/src/ob-genchanges.sh b/src/ob-genchanges.sh index db76027..6fa08e8 100644 --- a/src/ob-genchanges.sh +++ b/src/ob-genchanges.sh @@ -93,7 +93,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 if [ -n "${OB_DO_SOURCE}" ]; then changes="${OPK_SOURCE}_${OPK_SOURCE_VERSION}_src_all.changes" diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh index ffbaf82..36c5aee 100644 --- a/src/ob-gencontrol.sh +++ b/src/ob-gencontrol.sh @@ -172,7 +172,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 if [ -n "${OB_DO_SOURCE}" ]; then gen_control "src-${OPK_SOURCE}" "${OPK_SOURCE_VERSION}" 'src' 'all' \ diff --git a/src/ob-installdocs.sh b/src/ob-installdocs.sh index 2a3271d..9418514 100644 --- a/src/ob-installdocs.sh +++ b/src/ob-installdocs.sh @@ -62,7 +62,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 if ! doc_pkg="$(ob_get_doc_package)"; then ob_error "$(ob_get_msg 'cant_get_doc_pkg')" diff --git a/src/ob-installplatconf.sh b/src/ob-installplatconf.sh index 1ee90cd..f7bcb0f 100644 --- a/src/ob-installplatconf.sh +++ b/src/ob-installplatconf.sh @@ -81,7 +81,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 copied='false' diff --git a/src/ob-unpacksource.sh b/src/ob-unpacksource.sh index 0716257..6518279 100644 --- a/src/ob-unpacksource.sh +++ b/src/ob-unpacksource.sh @@ -138,7 +138,6 @@ main() fi ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 if [ -d 'src' ]; then ob_info "$(ob_get_msg 'already_unpacked')" diff --git a/src/opkbuild.sh b/src/opkbuild.sh index 7d49214..096fd68 100644 --- a/src/opkbuild.sh +++ b/src/opkbuild.sh @@ -226,7 +226,6 @@ setup_package() ob_info "$(ob_get_msg 'parse_package_metadata')" ob_init_package '..' || return 1 - ob_parse_package_metadata || return 1 OPK_SOURCE="$(ob_get_source_parameter 'Source')" OPK_SOURCE_VERSION="$(ob_get_source_parameter 'Version')" |