From 3d30d5fd864f7d591ce5295ead6f255e642ca16d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Fri, 30 Oct 2026 20:51:11 -0300 Subject: [PATCH] fix(go-xcat): read apt candidates in the C locale check_repo_version_apt looks for the "Candidate:" label of apt-cache policy. A translated apt prints that label in the user's language. The package table of go-xcat check, install and update then showed every package as "(not found)" in the repositories. Run apt-cache policy with LC_ALL="C" inside check_repo_version_apt, so that every caller gets the untranslated labels. Drop the LC_ALL=C that the install filter added. --- xCAT-server/share/xcat/tools/go-xcat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/tools/go-xcat b/xCAT-server/share/xcat/tools/go-xcat index f088f0cad5..3a934d3570 100755 --- a/xCAT-server/share/xcat/tools/go-xcat +++ b/xCAT-server/share/xcat/tools/go-xcat @@ -952,7 +952,7 @@ function check_repo_version_apt() local ver="" local policy="" local rc=0 - policy="$(apt-cache policy "$@" 2>/dev/null)" || rc="$?" + policy="$(LC_ALL="C" apt-cache policy "$@" 2>/dev/null)" || rc="$?" while read -r name ver do if [[ "${name}" =~ ^[a-z] ]] @@ -1994,7 +1994,7 @@ function install_packages_apt() [[ "$1" = "-y" ]] && yes=("-y") && shift local -a available=() local package="" ver="" versions="" - versions="$(LC_ALL=C check_repo_version_apt "$@")" + versions="$(check_repo_version_apt "$@")" warn_if_bad "$?" "query apt package candidates failed" || return 1 # As with dnf --setopt=strict=0, a package the repositories lack must not stop the install. for package in "$@"