[PATCH] Fix XDG_RUNTIME_DIR not set messages by creating one

Samantha N. Bueno sbueno+anaconda at redhat.com
Fri Mar 14 17:45:32 UTC 2014


On Fri, Mar 14, 2014 at 10:36:31AM -0400, David Shea wrote:
> ---
>  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

Looks ok to me.


More information about the anaconda-patches mailing list