[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..
From: |
Rob Browning |
Subject: |
Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/... |
Date: |
Fri, 16 Dec 2022 00:08:37 -0600 |
We're still trying to resolve some native compilation related crashes in
Debian in the hope that we'll be able to have 28 in the next stable
release --with-native-compilation. (Stage one of the freeze begins on
Jan 12.)
One remaining issue is that emacs crashes when HOME=/nope in some of our
test suites and perhapssome other packaging or install-related
activities. For example: https://bugs.debian.org/1021842
(To refresh, Debian policies require packages not to write outside of a
few specified locations in certain situations, e.g. package builds, and
HOME is not one of the specified locations.)
I can't recall from previous discussions whether that crash would be
considered a bug, or whether emacs just requires a writable cache dir
now (which is fine if so).
But I have discovered that if we allow the redirection of the
native-compile-target-directory to XDG_CACHE_HOME via something like
this in comp.el:
(defvar native-compile-target-directory (getenv "XDG_CACHE_HOME")
"When non-nil force the target directory for the eln files being compiled.")
then we can resolve the issue:
export HOME=/nope
export XDG_CACHE_HOME="$(mktemp -d ...)"
run-tests...
Of course, I assume the default above isn't quite right, i.e. if we were
to pursue this, I imagine we'd actually want to default
native-compile-target-directory to something more like
"$XDG_CACHE_HOME/emacs/eln-cache" when XDG_CACHE_DIR is set.
I also noticed that emacs already respects XDG_CONFIG_HOME, so I
imagined relying on XDG_CACHE_HOME might not be entirely suspect.
Thanks
--
Rob Browning
rlb @defaultvalue.org and @debian.org
GPG as of 2011-07-10 E6A9 DA3C C9FD 1FF8 C676 D2C4 C0F0 39E9 ED1B 597A
GPG as of 2002-11-03 14DD 432F AE39 534D B592 F9A0 25C8 D377 8C7E 73A4
- Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/...,
Rob Browning <=
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Eli Zaretskii, 2022/12/17
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Rob Browning, 2022/12/17
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Eli Zaretskii, 2022/12/17
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Rob Browning, 2022/12/17
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Rob Browning, 2022/12/17
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Eli Zaretskii, 2022/12/18
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Sean Whitton, 2022/12/24
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Eli Zaretskii, 2022/12/25
- Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Eli Zaretskii, 2022/12/25
Re: Possibly defaulting native-compile-target-directory to XDG_CACHE_HOME/..., Stefan Monnier, 2022/12/17