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

Commit

Permalink
Use /var/tmp instead of /tmp
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Juro Bystricky authored and phmccarty committed May 1, 2020
1 parent 1d104ca commit ef85344
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion explode/dpkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
// Dpkg will explode all .deb's specified and then return
// the install/ path inside that exploded tree.
func Dpkg(pkgs []string) (string, error) {
rootDir, err := ioutil.TempDir("", "abireport-dpkg")
rootDir, err := ioutil.TempDir("/var/tmp", "abireport-dpkg")
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion explode/eopkg.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
// Eopkg will explode all eopkgs passed to it and return the path to
// the "root" to walk.
func Eopkg(pkgs []string) (string, error) {
rootDir, err := ioutil.TempDir("", "abireport-eopkg")
rootDir, err := ioutil.TempDir("/var/tmp", "abireport-eopkg")
if err != nil {
return "", err
}
Expand Down
2 changes: 1 addition & 1 deletion explode/rpm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
// RPM will explode all RPMs passed to it and return the path to
// the "root" to walk.
func RPM(pkgs []string) (string, error) {
rootDir, err := ioutil.TempDir("", "abireport-rpm")
rootDir, err := ioutil.TempDir("/var/tmp", "abireport-rpm")
if err != nil {
return "", err
}
Expand Down

0 comments on commit ef85344

Please sign in to comment.