pub fn migrated_get_version(component_id: &str) -> StringExpand description
Rust equivalent of up_get_version() from update_helper.sh.
Returns the version string for a component, matching the shell behavior:
- ROCm: version from
/opt/rocm/.info/versionorrocminfo --version - Python modules:
__version__attribute or “not installed” - Git-based:
git log -1 --format="%h %s"or “installed” or “not installed” - Command-based: first line of
--versionoutput or “not installed” - permanent-env: “installed” or “not installed”
- Unknown: “unknown”
§Errors
Unknown component IDs return “unknown” (structured, not panic).
This matches the shell’s *) echo "unknown" ;; default case.