Remove broken symbolic links during cleanup

removing packages sadly doesn't run their %post scripts, so a lot of
broken links are left around for systemd units and/or sysvinit scripts.

So, after other cleanup, remove any broken links in /etc, /usr, or /lib.
This commit is contained in:
Will Woods 2011-08-05 17:25:57 -04:00
parent 297a572069
commit 14f4e8679f
1 changed files with 4 additions and 0 deletions

View File

@ -468,3 +468,7 @@ removefrom ${product.name}-logos /usr/share/pixmaps/* /usr/share/plymouth/*
## cleanup_python_files()
runcmd find ${root} -name "*.pyo" -type f -delete
runcmd find ${root} -name "*.pyc" -type f -exec ln -sf /dev/null {} \;
## remove any broken links in /etc, /usr, /lib
## NOTE: not checking /var because we want to keep /var/run
runcmd chroot ${root} find -L /etc /usr /lib -xdev -type l -delete