FROMGIT: bin/phase-functions: Move du stats into subshell

These variables are only used inside this subshell. This avoids
polluting the environment.

Apparently this calculation isn't hermetic. I'm not sure why:

 declare -x cros_setup_hooks_run="booya"
 declare -a exclude_hermetic=([0]="--exclude-non-hermetic")
 declare -- f
-declare -a isz=([0]="264" [1]="/var/tmp/portage/dev-libs/libffi-3.1-r8/image/")
-declare -a nsz=([0]="2803" [1]="/var/tmp/portage/dev-libs/libffi-3.1-r8/work")
+declare -a isz=([0]="16" [1]="/var/tmp/portage/dev-libs/libffi-3.1-r8/image/")
+declare -a nsz=([0]="2599" [1]="/var/tmp/portage/dev-libs/libffi-3.1-r8/work")
 declare -- phase_func
 __eapi6_src_install ()

Bug: https://bugs.gentoo.org/914441
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Signed-off-by: Sam James <sam@gentoo.org>
(cherry picked from commit 463af696914237bc6e210306fbc2f09f3a1005ce
 https://anongit.gentoo.org/git/proj/portage.git master)

BUG=b:281732865
TEST=CQ

Change-Id: I3970e01d6955f17835f2db205e44258d661a4902
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/portage_tool/+/4022490
Tested-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Commit-Queue: Raul Rangel <rrangel@chromium.org>
1 file changed