From 83bcfb556cfc36246c99cf92f0bc0ec8a8e6d755 Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 26 May 2015 00:40:04 -0400 Subject: cmd/install: Pick mirror before validating arch/plat --- (limited to 'lib/cmd') diff --git a/lib/cmd/install.sh b/lib/cmd/install.sh index e12435e..e63059d 100644 --- a/lib/cmd/install.sh +++ b/lib/cmd/install.sh @@ -79,18 +79,20 @@ cmd_install_main() else plat="$(profile_default_plat)" fi - if ! profile_validate_archplat "${arch}" "${plat}"; then - error 2 "$(get_msg 'cmd_install_bad_archplat')" \ - "${arch}" "${plat}" - fi - info "$(get_msg 'cmd_install_selected_arch')" "${arch}" - info "$(get_msg 'cmd_install_selected_plat')" "${plat}" - if [ "x${cmd_install_opt_m+set}" = 'xset' ]; then mirror="${cmd_install_opt_m}" else mirror="$(profile_select_mirror)" fi + + if ! profile_validate_archplat "${mirror}" "${arch}" "${plat}" \ + "${suite}"; then + error 2 "$(get_msg 'cmd_install_bad_archplat')" \ + "${arch}" "${plat}" + fi + + info "$(get_msg 'cmd_install_selected_arch')" "${arch}" + info "$(get_msg 'cmd_install_selected_plat')" "${plat}" info "$(get_msg 'cmd_install_selected_mirror')" "${mirror}" if [ "x${cmd_install_opt_F+set}" = 'xset' ]; then -- cgit v0.9.1