makeDBusConf: fail if xsltproc generates empty files
A few people have reported empty files in /etc/dbus-1 which can cause obscure issues. With this change, users can retry and get non-empty files. can be tested with `makeDBusConf { suidHelper = ""; serviceDirectories = []; }` and adding ``` rm $out/session.conf echo -n "" > $out/session.conf # or echo "" > $out/session.conf ```
This commit is contained in:
parent
4f5e982463
commit
a6138b750e
|
@ -42,4 +42,8 @@ runCommand "dbus-1"
|
||||||
--stringparam apparmor "$apparmor" \
|
--stringparam apparmor "$apparmor" \
|
||||||
${./make-session-conf.xsl} ${dbus}/share/dbus-1/session.conf \
|
${./make-session-conf.xsl} ${dbus}/share/dbus-1/session.conf \
|
||||||
> $out/session.conf
|
> $out/session.conf
|
||||||
|
|
||||||
|
# check if files are empty or only contain space characters
|
||||||
|
grep -q '[^[:space:]]' "$out/system.conf" || (echo "\"$out/system.conf\" was generated incorrectly and is empty, try building again." && exit 1)
|
||||||
|
grep -q '[^[:space:]]' "$out/session.conf" || (echo "\"$out/session.conf\" was generated incorrectly and is empty, try building again." && exit 1)
|
||||||
''
|
''
|
||||||
|
|
Loading…
Reference in a new issue