@@ -1909,6 +1909,53 @@ function read_package_sources() {
1909
1909
done
1910
1910
}
1911
1911
1912
+ # Fields of the bunch of maps struct.
1913
+ #
1914
+ # BOM_PKG_TO_TAGS_MVM_IDX - mapping of a package name to an array of
1915
+ # tags (mostly describing where the package
1916
+ # is used, like SDK or azure OEM or python
1917
+ # sysext)
1918
+ #
1919
+ # BOM_PKG_SLOTS_SET_MVM_IDX - mapping of a package name to a set of
1920
+ # slots available for the package (slots
1921
+ # before the update and after the update
1922
+ # are mixed here)
1923
+ #
1924
+ # BOM_OLD_PKG_SLOT_VERMINMAX_MAP_MVM_IDX - mapping of a package name
1925
+ # to used slots, each slot is
1926
+ # associated with a pair of
1927
+ # versions - lowest and
1928
+ # greatest used version (for
1929
+ # consistent packages, these
1930
+ # versions are the same); the
1931
+ # mapping is for packages
1932
+ # before the update
1933
+ #
1934
+ # BOM_NEW_PKG_SLOT_VERMINMAX_MAP_MVM_IDX - same as above, but for
1935
+ # packages after the update
1936
+ #
1937
+ # BOM_PKG_SOURCES_MAP_IDX - mapping of package name to the repository
1938
+ # name
1939
+ declare -gri BOM_PKG_TO_TAGS_MVM_IDX=0 BOM_PKG_SLOTS_SET_MVM_IDX=1 BOM_OLD_PKG_SLOT_VERMINMAX_MAP_MVM_IDX=2 BOM_NEW_PKG_SLOT_VERMINMAX_MAP_MVM_IDX=3 BOM_PKG_SOURCES_MAP_IDX=4
1940
+
1941
+ # Declare bunch of maps variables.
1942
+ #
1943
+ # Parameters:
1944
+ #
1945
+ # @ - names of variables to be used for bunch of maps
1946
+ function bunch_of_maps_declare() {
1947
+ struct_declare -ga " ${@ } " " ( '' '' '' '' '' )"
1948
+ }
1949
+
1950
+ # Unset bunch of maps variables.
1951
+ #
1952
+ # Parameters:
1953
+ #
1954
+ # @ - names of bunch of maps variables
1955
+ function bunch_of_maps_unset() {
1956
+ unset " ${@ } "
1957
+ }
1958
+
1912
1959
# Fields of the package output paths struct.
1913
1960
#
1914
1961
# POP_OUT_DIR_IDX - toplevel output directory.
@@ -2057,6 +2104,13 @@ function handle_package_changes() {
2057
2104
done
2058
2105
unset added_pkg_to_index_map
2059
2106
2107
+ bunch_of_maps_declare hpc_bunch_of_maps
2108
+ hpc_bunch_of_maps[BOM_PKG_TO_TAGS_MVM_IDX]=${pkg_to_tags_mvm_var_name}
2109
+ hpc_bunch_of_maps[BOM_PKG_SLOTS_SET_MVM_IDX]=hpc_pkg_slots_set_mvm
2110
+ hpc_bunch_of_maps[BOM_OLD_PKG_SLOT_VERMINMAX_MAP_MVM_IDX]=hpc_old_pkg_slot_verminmax_map_mvm
2111
+ hpc_bunch_of_maps[BOM_NEW_PKG_SLOT_VERMINMAX_MAP_MVM_IDX]=hpc_new_pkg_slot_verminmax_map_mvm
2112
+ hpc_bunch_of_maps[BOM_PKG_SOURCES_MAP_IDX]=hpc_package_sources_map
2113
+
2060
2114
# The loop below goes over the pairs of old and new package
2061
2115
# names. For each name there will be some checks done (like does
2062
2116
# this package even exist). Each name in the pair has a set of
@@ -2336,6 +2390,8 @@ function handle_package_changes() {
2336
2390
pkg_debug_disable
2337
2391
done
2338
2392
2393
+ bunch_of_maps_unset hpc_bunch_of_maps
2394
+
2339
2395
mvm_unset hpc_new_pkg_slot_verminmax_map_mvm
2340
2396
mvm_unset hpc_old_pkg_slot_verminmax_map_mvm
2341
2397
mvm_unset hpc_pkg_slots_set_mvm
0 commit comments