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 95260a79321d..bbde07ae9a98 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" diff --git a/pkgs/development/rocm-modules/5/update.nix b/pkgs/development/rocm-modules/5/update.nix index e20697675c11..ebf21b8f15a7 100644 --- a/pkgs/development/rocm-modules/5/update.nix +++ b/pkgs/development/rocm-modules/5/update.nix @@ -23,6 +23,11 @@ let IFS='.' read -a version_arr <<< "$version" + if (( ''${version_arr[0]} > 5 )); then + echo "'rocmPackages_5.${pname}' is already at it's maximum allowed version.''\nAny further upgrades should go into 'rocmPackages_X.${pname}'." 1>&2 + exit 1 + fi + if [ "''${#version_arr[*]}" == 2 ]; then version="''${version}.0" fi