diff options
author | Raul E Rangel <rrangel@chromium.org> | 2022-11-09 21:26:18 -0700 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-10-13 11:19:00 +0100 |
commit | 463af696914237bc6e210306fbc2f09f3a1005ce (patch) | |
tree | 56c2ca82acd5adc8e8679b56213ca94700704ac4 /bin | |
parent | config: Don't directly modify FEATURES (diff) | |
download | portage-463af696914237bc6e210306fbc2f09f3a1005ce.tar.gz portage-463af696914237bc6e210306fbc2f09f3a1005ce.tar.bz2 portage-463af696914237bc6e210306fbc2f09f3a1005ce.zip |
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:
@@ -268,10 +268,10 @@
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>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/phase-functions.sh | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/phase-functions.sh b/bin/phase-functions.sh index 071941ff7..cd672a878 100644 --- a/bin/phase-functions.sh +++ b/bin/phase-functions.sh @@ -620,12 +620,11 @@ __dyn_install() { # record build & installed size in build log if type -P du &>/dev/null; then - local nsz=( $(du -ks "${WORKDIR}") ) - local isz=( $(du -ks "${D}") ) - # subshell to avoid polluting the caller env with the helper # functions below ( + local nsz=( $(du -ks "${WORKDIR}") ) + local isz=( $(du -ks "${D}") ) # align $1 to the right to the width of the widest of $1 and $2 padl() { local s1=$1 |