rmdir: avoid failing when directory did not exist
I bet nobody has `environment.usrbinenv = null`, it would fail on the second activation trying to `rmdir` inexisting `/usr/bin`
This commit is contained in:
parent
af665d822a
commit
45db499d2d
|
@ -205,7 +205,7 @@ in
|
|||
''
|
||||
else ''
|
||||
rm -f /usr/bin/env
|
||||
rmdir --ignore-fail-on-non-empty /usr/bin /usr
|
||||
rmdir -p /usr/bin || true
|
||||
'';
|
||||
|
||||
system.activationScripts.ld-linux =
|
||||
|
@ -218,7 +218,7 @@ in
|
|||
mv -f ${target}.tmp ${target} # atomically replace
|
||||
'' else ''
|
||||
rm -f ${target}
|
||||
rmdir --ignore-fail-on-non-empty $(dirname ${target})
|
||||
rmdir $(dirname ${target}) || true
|
||||
'')
|
||||
{
|
||||
"i686-linux" ."/lib/ld-linux.so.2" = "${pkgs.glibc.out}/lib/ld-linux.so.2";
|
||||
|
|
Loading…
Reference in a new issue