summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2015-05-26 00:40:04 (EDT)
committer P. J. McDermott <pj@pehjota.net>2015-05-26 00:40:04 (EDT)
commit83bcfb556cfc36246c99cf92f0bc0ec8a8e6d755 (patch)
treef112a078682464343c9fa58c156216b5384dcd98
parente2bcd0db8539a731e738ac1b28dbf5b76bcb880b (diff)
cmd/install: Pick mirror before validating arch/plat
-rw-r--r--lib/cmd/install.sh16
1 files changed, 9 insertions, 7 deletions
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