diff --git a/install_proxmenux.sh b/install_proxmenux.sh index 4b2814d6..68074668 100755 --- a/install_proxmenux.sh +++ b/install_proxmenux.sh @@ -676,10 +676,13 @@ install_normal_version() { fi show_progress $current_step $total_steps "Installing basic dependencies." - + + msg_info "Refreshing apt cache..." + apt-get update -y > /dev/null 2>&1 || true + msg_ok "apt cache refreshed." + + msg_info "Installing jq..." if ! command -v jq > /dev/null 2>&1; then - apt-get update > /dev/null 2>&1 - if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then update_config "jq" "installed" else @@ -701,24 +704,14 @@ install_normal_version() { else update_config "jq" "already_installed" fi - - - - + msg_ok "jq ready." BASIC_DEPS=("dialog" "curl" "git") - if [ -z "${APT_UPDATED:-}" ]; then - apt-get update -y > /dev/null 2>&1 || true - APT_UPDATED=1 - fi - for pkg in "${BASIC_DEPS[@]}"; do - # `dpkg -l | grep -qw "$pkg"` treats `-` as a word boundary, so a - # query for `python3` would falsely match `python3-pip` and skip - # the real `python3` install. `dpkg-query -W -f='${Status}'` asks - # for the EXACT package and reports "install ok installed" only - # when truly present. Issue #205 traced back here. + msg_info "Installing $pkg..." + # dpkg-query for the EXACT package — `dpkg -l | grep -qw python3` + # falsely matches `python3-pip`. Issue #205. if ! dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q "ok installed"; then if apt-get install -y "$pkg" > /dev/null 2>&1; then update_config "$pkg" "installed" @@ -730,6 +723,7 @@ install_normal_version() { else update_config "$pkg" "already_installed" fi + msg_ok "$pkg ready." done diff --git a/install_proxmenux_beta.sh b/install_proxmenux_beta.sh index 8613186a..d64aecb2 100644 --- a/install_proxmenux_beta.sh +++ b/install_proxmenux_beta.sh @@ -608,8 +608,12 @@ install_beta() { # ── Step 2: Dependencies ────────────────────────────── show_progress $current_step $total_steps "Installing system dependencies" + msg_info "Refreshing apt cache..." + apt-get update -y > /dev/null 2>&1 || true + msg_ok "apt cache refreshed." + + msg_info "Installing jq..." if ! command -v jq > /dev/null 2>&1; then - apt-get update > /dev/null 2>&1 if apt-get install -y jq > /dev/null 2>&1 && command -v jq > /dev/null 2>&1; then update_config "jq" "installed" else @@ -626,18 +630,13 @@ install_beta() { else update_config "jq" "already_installed" fi + msg_ok "jq ready." local BASIC_DEPS=("dialog" "curl" "git") - if [ -z "${APT_UPDATED:-}" ]; then - apt-get update -y > /dev/null 2>&1 || true - APT_UPDATED=1 - fi - for pkg in "${BASIC_DEPS[@]}"; do - # Strict per-package check — `dpkg -l | grep -qw python3` falsely - # matches `python3-pip` (the `-` is a word boundary), so dpkg-query - # for the EXACT package name is the only reliable test. - # Issue #205. + msg_info "Installing $pkg..." + # dpkg-query for the EXACT package name — `dpkg -l | grep -qw python3` + # falsely matches `python3-pip`. Issue #205. if ! dpkg-query -W -f='${Status}' "$pkg" 2>/dev/null | grep -q "ok installed"; then if apt-get install -y "$pkg" > /dev/null 2>&1; then update_config "$pkg" "installed" @@ -649,6 +648,7 @@ install_beta() { else update_config "$pkg" "already_installed" fi + msg_ok "$pkg ready." done msg_ok "Dependencies installed: jq, dialog, curl, git."