diff options
Diffstat (limited to 'pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/update.nix')
-rw-r--r-- | pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/update.nix | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/update.nix b/pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/update.nix index 95260a79321d4..bbde07ae9a98b 100644 --- a/pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/update.nix +++ b/pkgs/development/rocm-modules/5/hsa-amd-aqlprofile-bin/update.nix @@ -37,6 +37,12 @@ let extVersion="$(echo $deb | grep -o -P "(?<=\.....).*(?=\..*-)")" version="$(echo $extVersion | sed "s/0/./1" | sed "s/0/./1")" + IFS='.' read -a version_arr <<< "$version" + + if (( ''${version_arr[0]} > 5 )); then + echo "'rocmPackages_5.${prefix}-bin' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${prefix}-bin'." 1>&2 + exit 1 + fi if (( ''${#extVersion} == 5 )); then repoVersion="$version" |