[PATCH] Fix XDG_RUNTIME_DIR not set messages by creating one

David Shea dshea at redhat.com
Fri Mar 14 14:36:31 UTC 2014


---
 tests/pylint/runpylint.sh | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tests/pylint/runpylint.sh b/tests/pylint/runpylint.sh
index 32328c1..a91e6d4 100755
--- a/tests/pylint/runpylint.sh
+++ b/tests/pylint/runpylint.sh
@@ -8,6 +8,13 @@
 # to stdout and this script will exit with a status of 1, if no (non filtered)
 # warnings are found it exits with a status of 0
 
+# XDG_RUNTIME_DIR is "required" to be set, so make one up in case something
+# actually tries to do something with it
+if [ -z "$XDG_RUNTIME_DIR" ]; then
+    export XDG_RUNTIME_DIR="$(mktemp -d)"
+    trap "rm -rf \"$XDG_RUNTIME_DIR\"" EXIT
+fi
+
 # If $top_srcdir is set, assume this is being run from automake and we don't
 # need to keep a separate log
 export pylint_log=0
-- 
1.9.0



More information about the anaconda-patches mailing list