-
Notifications
You must be signed in to change notification settings - Fork 9
Tempfiles for data.tar.gz and control.tar.gz #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
ping @rikvdh |
…a1), less verbose dpkg test
| // SetTempDir sets the temporary directory for intermediate files. When the directory doesn't | ||
| // exist it is automaticly created. The caller is responsible for the cleanup of tempdir. | ||
| func SetTempDir(dir string) error { | ||
| if dir == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When the directory is emtpy you take the empty-directory as TempDir? Don't you want to get the system-wide temp-dir with os.TempDir()?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty Directory is automatic os.TempDir, see os.TempFile
control.go
Outdated
| c.info.maintainer, | ||
| c.info.maintainerEmail) | ||
| o += fmt.Sprintf("Installed-Size: %d\n", installedSize) | ||
| o += fmt.Sprintf("Installed-Size: %d\n", uint64(math.Floor((float64(installedSize)/1024)+0.5))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use math.Ceil() without the floor(x+0.5) which is also wrong.
Initial work on tempfiles for data.tar.gz and control.tar.gz when packaging exceed RAM size.