Revert "Revert "oran-shell-release: release image for F""
[pti/rtp.git] / meta-starlingx / meta-stx-flock / stx-utilities / files / 0001-cpumap_functions.sh-fix-perl-experimental-feature-is.patch
1 From e2dcf93685e6947540119fd5caff0e440857801c Mon Sep 17 00:00:00 2001
2 From: Jackie Huang <jackie.huang@windriver.com>
3 Date: Thu, 11 Jun 2020 22:41:00 +0800
4 Subject: [PATCH] cpumap_functions.sh: fix perl experimental feature issue
5
6 An experimental feature added in Perl 5.14 allowed each, keys, push,
7 pop, shift, splice, unshift, and values to be called with a scalar
8 argument. This experiment is considered unsuccessful, and has been
9 removed in 5.23 and later releases. So don't use this feature to
10 avoid failure:
11 localhost:~# platform_expanded_cpu_list
12 Experimental keys on scalar is now forbidden at -e line 13.
13
14 Upstream-Status: Submitted [https://review.opendev.org/759783]
15
16 Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
17 ---
18  utilities/worker-utils/worker-utils/cpumap_functions.sh | 2 +-
19  1 file changed, 1 insertion(+), 1 deletion(-)
20
21 diff --git a/utilities/worker-utils/worker-utils/cpumap_functions.sh b/utilities/worker-utils/worker-utils/cpumap_functions.sh
22 index ab961f4..ecbbb05 100644
23 --- a/utilities/worker-utils/worker-utils/cpumap_functions.sh
24 +++ b/utilities/worker-utils/worker-utils/cpumap_functions.sh
25 @@ -389,7 +389,7 @@ function topology_to_cpulist {
26      }
27  }
28  END {
29 -    @cores = sort { $a <=> $b } keys $T{$socket};
30 +    @cores = sort { $a <=> $b } keys %{ $T{$socket} };
31      @sel_cores = splice @cores, $core_start, $num_cores;
32      @lcpus = ();
33      for $C (@sel_cores) {
34 --
35 2.7.4