diff options
-rw-r--r-- | src/ob-gencontrol.sh | 60 |
1 files changed, 27 insertions, 33 deletions
diff --git a/src/ob-gencontrol.sh b/src/ob-gencontrol.sh index be42c32..471e079 100644 --- a/src/ob-gencontrol.sh +++ b/src/ob-gencontrol.sh @@ -135,39 +135,33 @@ gen_control_bin() tr '\n' ' ') EOF - if :; then - for name in Essential Depends Recommends Suggests Pre-Depends \ - Conflicts Provides Replaces; do - value="$(ob_get_binary_parameter "${binary}" "${name}")" - if [ -z "${value}" ]; then - continue - fi - case "${name}" in - 'Essential') - ;; - 'Depends' | 'Recommends' | \ - 'Suggests' | 'Pre-Depends') - value="$(ob_reduce_deps \ - -a "${OPK_HOST_ARCH}" \ - -p "${OPK_HOST_PLAT}" \ - -- "${value}")" - value="$(ob_substvars "${value}" \ - "${binary}")" - ;; - 'Conflicts' | 'Provides' | 'Replaces') - value="$(ob_reduce_deps \ - -a "${OPK_HOST_ARCH}" \ - -p "${OPK_HOST_PLAT}" \ - -u -- "${value}")" - value="$(ob_substvars "${value}" \ - "${binary}")" - ;; - esac - printf '%s: %s\n' "${name}" "${value}" | \ - sed 's/[, ]*$//' \ - >>"${binary}.control/control" - done - fi + for name in Essential Depends Recommends Suggests Pre-Depends \ + Conflicts Provides Replaces; do + value="$(ob_get_binary_parameter "${binary}" "${name}")" + if [ -z "${value}" ]; then + continue + fi + case "${name}" in + 'Essential') + ;; + 'Depends' | 'Recommends' | 'Suggests' | 'Pre-Depends') + value="$(ob_reduce_deps \ + -a "${OPK_HOST_ARCH}" \ + -p "${OPK_HOST_PLAT}" \ + -- "${value}")" + value="$(ob_substvars "${value}" "${binary}")" + ;; + 'Conflicts' | 'Provides' | 'Replaces') + value="$(ob_reduce_deps \ + -a "${OPK_HOST_ARCH}" \ + -p "${OPK_HOST_PLAT}" \ + -u -- "${value}")" + value="$(ob_substvars "${value}" "${binary}")" + ;; + esac + printf '%s: %s\n' "${name}" "${value}" | sed 's/[, ]*$//' \ + >>"${binary}.control/control" + done cat >>"${binary}.control/control" <<-EOF Installed-Size: $(calc_inst_size "${binary}") |