From 94aa2289a472f47a8dfb6cad332c50a2b020f1ab Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Wed, 24 Sep 2014 14:08:19 -0400 Subject: cmd/build: Drop handling of old opkbuild --- (limited to 'lib/cmd') diff --git a/lib/cmd/build.sh b/lib/cmd/build.sh index 73163f1..140ef4a 100644 --- a/lib/cmd/build.sh +++ b/lib/cmd/build.sh @@ -24,14 +24,9 @@ use rand use package use control -cmd_build_old_opkbuild= -cmd_build_opkbuild_package= -cmd_build_opkbuild_version= - cmd_build_main() { local root= - local opkbuild_plat_opt= local opkbuild_optstring= local arch= local plat= @@ -51,20 +46,7 @@ cmd_build_main() root="${1}" shift 1 - # opkbuild's platform option will be changing from -P to -p. Detect - # either, depending on the version of opkbuild installed. - cmd_build_old_opkbuild=true - parse_control "${root}/var/lib/opkg/status" \ - cmd_build_opkbuild_field_cb cmd_build_opkbuild_para_cb \ - 'Package Version' - if ${cmd_build_old_opkbuild}; then - opkbuild_plat_opt='P' - opkbuild_optstring='bBASFT:a:P:DdCcr:hV' - else - opkbuild_plat_opt='p' - opkbuild_optstring="$(cat \ - "${root}/usr/share/opkbuild/optstring")" - fi + opkbuild_optstring="$(cat "${root}/usr/share/opkbuild/optstring")" arch="$(cat "${root}/etc/proteanos_arch")" plat="$(cat "${root}/etc/proteanos_plat")" while getopts "${opkbuild_optstring}" opt 2>/dev/null; do @@ -72,7 +54,7 @@ cmd_build_main() a) arch="${OPTARG}" ;; - ${opkbuild_plat_opt}) + p) plat="${OPTARG}" ;; esac @@ -142,40 +124,6 @@ cmd_build_main() rmdir "${root}${dir}" } -cmd_build_opkbuild_field_cb() -{ - local name="${1}" - local value="${2}" - - case "${name}" in - Package) - cmd_build_opkbuild_package="${value}" - ;; - Version) - cmd_build_opkbuild_version="${value}" - ;; - esac - - return 0 -} - -cmd_build_opkbuild_para_cb() -{ - if [ "x${cmd_build_opkbuild_package}" = 'xopkbuild' ]; then - case "${cmd_build_opkbuild_version}" in - 3.0.0~beta[3-5]-*) - cmd_build_old_opkbuild=true - ;; - *) - cmd_build_old_opkbuild=false - ;; - esac - return 1 - fi - - return 0 -} - cmd_build_make_deps_pkg() { local build_dir="${1}" -- cgit v0.9.1