Skip to content
This repository was archived by the owner on Jan 6, 2023. It is now read-only.

Commit ef85344

Browse files
Juro Bystrickyphmccarty
authored andcommitted
Use /var/tmp instead of /tmp
The folder /tmp is typically 50% of installed RAM size. This may not be enough for large packages. Use /var/tmp instead. The performance impact is not significant.
1 parent 1d104ca commit ef85344

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

explode/dpkg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import (
2626
// Dpkg will explode all .deb's specified and then return
2727
// the install/ path inside that exploded tree.
2828
func Dpkg(pkgs []string) (string, error) {
29-
rootDir, err := ioutil.TempDir("", "abireport-dpkg")
29+
rootDir, err := ioutil.TempDir("/var/tmp", "abireport-dpkg")
3030
if err != nil {
3131
return "", err
3232
}

explode/eopkg.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ import (
2727
// Eopkg will explode all eopkgs passed to it and return the path to
2828
// the "root" to walk.
2929
func Eopkg(pkgs []string) (string, error) {
30-
rootDir, err := ioutil.TempDir("", "abireport-eopkg")
30+
rootDir, err := ioutil.TempDir("/var/tmp", "abireport-eopkg")
3131
if err != nil {
3232
return "", err
3333
}

explode/rpm.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
// RPM will explode all RPMs passed to it and return the path to
2626
// the "root" to walk.
2727
func RPM(pkgs []string) (string, error) {
28-
rootDir, err := ioutil.TempDir("", "abireport-rpm")
28+
rootDir, err := ioutil.TempDir("/var/tmp", "abireport-rpm")
2929
if err != nil {
3030
return "", err
3131
}

0 commit comments

Comments
 (0)