-
Notifications
You must be signed in to change notification settings - Fork 18
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
Write temporary files to local directory by default #10
Conversation
Signed-off-by: Stefan Weil <sw@weilnetz.de>
This fixes a build problem on one of my virtual machines which has only 1.9 GB free in the root filesystem (and so in Especially |
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.
I understand the use-case and the solution is nice. But since often /tmp
is in-memory or on faster disks, and automatic clean-up is included, I'd prefer this to be an opt-in, not an opt-out.
IIUC, modern Linux distributions do not set TMPDIR
by default (despite it's being a POSIX requirement), but rely on the /tmp
fallback. So your patch would change the default behaviour from /tmp
to ./tmp
.
Have you tried running your build with make ocrd-anybaseocr-crop TMPDIR=$PWD/tmp
or export TMPDIR=$PWD/tmp; make ocrd-anybaseocr-crop
– without the patch? (If that works, all we'd have to do is add a hint about TMPDIR
in the README and for make help
.)
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.
I concur with @bertsky, let's make this optional and default to /tmp
so you CAN do
d=$(mktemp -d -p $PWD) && \
make ocrd-anybaseocr-crop TMPDIR="$d" && \
rm -rf -- "$d"
but do not HAVE to set TMPDIR explicitly
I used |
Then I'd say just put |
I added a paragraph to the README on this. |
Can you cherry pick UB-Mannheim@9848636 to master though? |
Already done. I also fixed a typo, so you will get a local conflict. |
Signed-off-by: Stefan Weil sw@weilnetz.de