Skip to content

Commit d892fc6

Browse files
committed
pkgdiff-mg: use /var/tmp instead of /tmp as default TMPDIR
pkgdiff can cause large files in the used temprorary directory that are not cleaned up on exit. Using /tmp for those, which is often a tmpfs, which means that the files consume main memory at first. Later the system may move the unused files on the tmpfs into swap. In any case, using /var/tmp instead of /tmp as default TMPDIR for pkgdiff-mg is sensible. As a genral rule of thumb, /tmp should be used for smaller, size bounded files only; /var/tmp for everything else. Signed-off-by: Florian Schmaus <[email protected]>
1 parent 153fafa commit d892fc6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkgdiff-mg

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ cat2=$(get_category "${2}")
3232
fn1=${1##*/}
3333
fn2=${2##*/}
3434

35-
export PORTAGE_TMPDIR="${TMPDIR:-/tmp}"/mgorny-dev-scripts
35+
export PORTAGE_TMPDIR="${TMPDIR:-/var/tmp}"/mgorny-dev-scripts
3636
export USE="${USE} test"
3737
mkdir -p "${PORTAGE_TMPDIR}"
3838
ebuild "${1}" unpack

0 commit comments

Comments
 (0)