fix: ignore '$TMPDIR' when it is an unusable directory#320
Open
fix: ignore '$TMPDIR' when it is an unusable directory#320
Conversation
A recent audit of Ubuntu’s Rust utilities¹ led me to learn that `$TMPDIR` is only intended to be used when the directory it points to is accessible:² If applications are written to use temporary or intermediate files, they should use the _TMPDIR_ environment variable, if it is set and represents an accessible directory, to select the location of temporary files. The effect of this change is that `rumur --help` with an unusable `$TMPDIR` set will now fall back to using /tmp instead of trying (and failing) to use this `$TMPDIR`. ¹ https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773 ² https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap01.html
The Ubuntu toolchain PPA seems to be having an outage wherein (at least) GCC 15 and 16 are not currently available. Bizarrely apt’s behaviour when failing to find an exact package is to treat the package name as a regex, which in the case of g++x matches the corresponding Clang package.¹ This causes a confusing situation where package installation appears to succeed and then compilation either fails to find the expected GCC or incorrectly finds Clang and builds with that. This change should hopefully cause an earlier more obvious failure when GCC fails to install. ¹ https://askubuntu.com/questions/1341002/apt-install-g-10-installs-clang-10-instead-of-g-10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A recent audit of Ubuntu’s Rust utilities¹ led me to learn that
$TMPDIRis only intended to be used when the directory it points to is accessible:²The effect of this change is that
rumur --helpwith an unusable$TMPDIRset will now fall back to using /tmp instead of trying (and failing) to use this$TMPDIR.¹ https://discourse.ubuntu.com/t/an-update-on-rust-coreutils/80773
² https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap01.html